我已经使用空的web应用程序和nuget服务器包建立了一个私人的nuget饲料。它全部正常工作,我可以从Feed中检索,并且可以使用Nuget包资源管理器发布到私人Feed。 但我不能通过命令行发布 - 它提示输入凭据。我已经在Appsettings中的Web应用程序中设置了ApiKey,并设置了一个简单的密码,并且我尝试将ApiKey添加到push命令中。这提示我输入用户名和密码。 我也尝试了SetApiKey命令,但我得到了相同的行为。 在构建服务器上,我尝试了相同的结果。推送到私人的nuget饲料提示凭据
这里是从构建日志中的错误消息(识别信息x'd出)
nuget pack "C:\Builds\2\OE Phase II\Common\src\WebApi\Web.Http\Bxxxxxxxs.Web.Http.csproj" -IncludeReferencedProjects -Properties Configuration=Release
nuget SetApiKey Bxxxxxxx1 -Source http://tfs12.xxxxxxxrps.com/Nuget
nuget push *.nupkg -s http://tfs12.xxxxxxxrps.com/Nuget/
C:\Builds\2\OE Phase II\Common\bin\xxxxxxx.Web.Http.dll
1 File(s) copied
Attempting to build package from 'xxxxxxx.Web.Http.csproj'.
Packing files from 'C:\Builds\2\OE Phase II\Common\src\WebApi\Web.Http\bin\Release'.
Using 'xxxxxxxs.Web.Http.nuspec' for metadata.
Found packages.config. Using packages listed as dependencies
Successfully created package 'C:\Builds\2\OE Phase II\Common\bin\xxxxxxxs.Web.Http.1.0.0.0.nupkg'.
The API Key 'xxxxxxx' was saved for 'http://tfs12.xxxxxxxrps.com/Nuget'.
Pushing Bxxxxxxxrs.Data 1.0.0.0 to 'http://tfs12.xxxxxxxrps.com/Nuget/'...
Please provide credentials for: http://tfs12.xxxxxxxrps.com/Nuget/
Object reference not set to an instance of an object.
UserName: Password:
我只是将它标记为答案,因为它修复了我的命令行,可以推送一个包。奇怪的是,包资源管理器已停止工作,推到服务器和我的搜索为什么已经让我回到我原来的问题。因此,现在命令行已修复,但Package Explorer仍然不起作用。 – Noel
如果您想要更安全一点,只需将写入权限添加到不是每个用户的用户。 – Kam
我在使用IIS 7.x的Windows 7上。我必须将“写入”权限添加到以下本地用户:IUSR和IIS_IUSRS –