nuget - 推送到私有(private) nuget 提要 凭据提示

标签 nuget nuget-server

我已经使用一个空的 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 的解决方案

  • 打开IIS管理器
  • 找到你的“Nuget.Server”应用程序
  • 右键单击并选择“编辑权限”
  • 转到“安全”选项卡

  • 为“所有人”组添加“写入”权限。

    关于nuget - 推送到私有(private) nuget 提要 凭据提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20228184/

    相关文章:

    NuGet - 安装报告 "The remote server returned an error: (404) Not Found."的单个包

    authentication - 推送包时如何避免nuget认证?

    c# - 从 NuGetV3 API 获取包

    visual-studio - SecureNuGetPackageBuildImports目标是什么?

    xml - 打开两个XMl文件时Visual Studio崩溃

    c# - 升级到 .NET 4.7 后为 "Predefined type System.ValueTuple is not defined or imported"

    javascript - 带有 NuGet 的 Visual Studio javaScript 默认目录

    Nuget 包在安装和推送时失败

    nuget - 使用 NuGet 将我的解决方案中的 "All"包推送到共享驱动器?

    c# - 是否可以在 VS2012 中创建一个多项目解决方案,其中某些项目已经绑定(bind)到 TFS?