6

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. 
4

1 回答 1

2

您现在可以在本地 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 设置文档。

于 2013-02-20T14:38:48.497 回答