Nuget错误:请提供以下网址的凭据:https://www.myget.org/F

时间:2013-02-20 13:34:18

标签: nuget tfsbuild myget

Nuget一直告诉我它无法在非交互模式下提示输入。我将凭证添加到nuget.config并添加nuget -NonInteractive开关到nuget命令。我想我做错了什么......但是什么?

构建日志的一部分:

RestorePackages:
  C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.exe sources add -name rai69 -source "https://www.myget.com/F/rai69/"
  Package Source with Name: rai69 added successfully.
  C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.exe setapikey 763736d6-ff35-45ca-af37-064cfc87fc45 -source "https://www.myget.com/F/rai69/"
  The API Key '763736d6-ff35-45ca-af37-064cfc87fc45' was saved for 'https://www.myget.com/F/rai69/'.
  C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.exe sources update -name rai69 -user **** -pass ****
  Package source "rai69" was successfully updated.
  attrib -r C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.config
  copy %appdata%\nuget\nuget.config C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget /y
      1 file(s) copied.
  "C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.exe" install "C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\TfsOnlineBuildNugetTest\packages.config" -source "https://www.myget.org/F/rai69/" -o "C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\packages" -verbosity detailed -noninteractive 
  Please provide credentials for: https://www.myget.org/F/rai69/
C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.targets(121,7): error : Cannot prompt for input in non-interactive mode.     [C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\TfsOnlineBuildNugetTest\TfsOnlineBuildNugetTest.csproj]
  UserName: 
C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.targets(121,7): error MSB3073: The command ""C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\.nuget\nuget.exe" install         "C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\TfsOnlineBuildNugetTest\packages.config" -source "https://www.myget.org/F/rai69/" -o "C:\a\src\d\projects\poc\TfsOnlineBuildNugetTest\packages" -verbosity detailed -noninteractive " exited with code 1. 

1 个答案:

答案 0 :(得分:1)

您现在可以在本地nuget.config中正确使用明文密码,如本文所述:http://www.xavierdecoster.com/deploying-to-azure-web-sites-using-nuget-package-restore-from-a-secured-feed

另请查看http://docs.nuget.org/docs/reference/nuget-config-settings上的nuget.config设置文档。