我已经使用空的Web应用程序和nuget服务器包设置了一个私有nuget feed。一切都很正常,我可以从feed中检索,并且可以使用Nuget Package Explorer发布到私有feed中。
但是我无法通过命令行发布-它提示输入凭据。我已经在Appsettings中设置了ApiKey(一个简单密码), 也尝试将ApiKey添加到推送命令中。这会提示我输入用户名,然后是密码。
我还尝试过SetApiKey命令,但得到了相同的结果。
在构建服务器上,我正在尝试相同的操作,但结果相同。
这是来自构建日志的错误消息(标识信息已被打码):
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: