我已经使用一个空的 Web 应用程序和 nuget 服务器包设置了一个私有(private)的 nuget 提要。一切正常,我可以从提要中检索,并且可以使用 Nuget 包资源管理器发布到私有(private)提要。
但我无法通过命令行发布 - 它会提示输入凭据。我已在 Appsettings 的 Web 应用程序中将 ApiKey 设置为一个简单的密码,并尝试将 ApiKey 添加到推送命令中。这提示我输入用户名,然后输入密码。
我也尝试过 SetApiKey 命令,但我得到了相同的行为。
在构建服务器上,我正在尝试相同的结果并获得相同的结果。
这是来自构建日志的错误消息(识别信息 x'd out)
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:
最佳答案
找到适用于 Windows Server 2012 和 Nuget.Server 2.8.5 的解决方案
为“所有人”组添加“写入”权限。
关于nuget - 推送到私有(private) nuget 提要 凭据提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20228184/