推送到私有nuget feed提示输入凭据 [英] Pushing to private nuget feed Prompts for Credentials

查看:331
本文介绍了推送到私有nuget feed提示输入凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用一个空的Web应用程序和nuget服务器软件包设置了一个私有的nuget提要.一切正常,我可以从源中检索,也可以使用Nuget包资源管理器将其发布到私有源. 但是我无法通过命令行发布-提示输入凭据.我已经在Web应用程序的Appsettings中将ApiKey设置为简单密码,并且尝试将ApiKey添加到push命令中.这提示我输入用户名,然后输入密码. 我也尝试了SetApiKey命令,但是得到了相同的行为. 在构建服务器上,我正在尝试具有相同结果的相同事情.

I have set up a private nuget feed using a empty web application and the nuget server package. It is all working, I can retrieve from the feed, and I can publish to the private feed using the Nuget Package Explorer. But I cant publish via the command line - it prompts for credentials. I have set the ApiKey in the web application in the Appsettings, to a simple password, and I have tried adding the ApiKey to the push command. This Prompts me for a username and then a password. I have also tried the SetApiKey command but I get the same behavior. On the build server I am trying the same thing with the same results.

这是来自构建日志的错误消息(标识信息x'd)

Here is the error messages from the build Log (identifying info 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的解决方案

Found solution for Windows Server 2012 and Nuget.Server 2.8.5

  • 打开IIS管理器
  • 找到您的"Nuget.Server"应用程序
  • 右键单击并选择编辑权限"
  • 转到安全"标签

为所有人"组添加写"权限.

Add "write" permission for group "Everyone".

这篇关于推送到私有nuget feed提示输入凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆