som*_*men 3 visual-studio nuget azure-artifacts
我.nupkg在本地有文件,正在尝试将其推送到天蓝色工件。我之前一直在推送软件包,但由于某种原因它现在停止工作了。我有一个提要设置,并且我在天蓝色工件中获得了该提要的完全所有者权限。
我已将NuGet.CommandLine包安装到我的项目中,并在包管理器控制台中运行以下命令(当我从 Windows 命令终端运行它时,该行为会重复)
nuget.exe push -ConfigFile "D:\Projects\myProj\NuGet.Config" -Source "Itm_Feed" -ApiKey az "D:\Projects\myProj\LocalPackages\ITM.VisiWin7.Common.2.12.0.nupkg"
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin'.
Please provide credentials for: https://pkgs.dev.azure.com/tembogroup/HMI/_packaging/Itm_Feed/nuget/v3/index.json
Run Code Online (Sandbox Code Playgroud)
Nuget.config
nuget.exe push -ConfigFile "D:\Projects\myProj\NuGet.Config" -Source "Itm_Feed" -ApiKey az "D:\Projects\myProj\LocalPackages\ITM.VisiWin7.Common.2.12.0.nupkg"
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin'.
Please provide credentials for: https://pkgs.dev.azure.com/tembogroup/HMI/_packaging/Itm_Feed/nuget/v3/index.json
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,它不断提示我输入凭据 - 以前在工作时它没有这样做。
当我从 Windows 命令终端运行它时,该行为会重复
当我使用Username and Password.
要解决此问题,您可以尝试使用用户名+ PAT(个人访问令牌)。
例如:
另一方面,如果每次都需要在命令行中输入用户名和密码,那就有点不方便了。
因此,您可以尝试使用以下命令将packageSourceCredentials添加到 nuget.config 文件中。
努吉特命令:
nuget sources update -name Itm_Feed -username 123 -password <PAT>
Run Code Online (Sandbox Code Playgroud)
在这种情况下,您可以运行 Nuget Push,而无需添加用户名和 PAT。
注意: Nuget 资源名称不能是纯数字。
| 归档时间: |
|
| 查看次数: |
1628 次 |
| 最近记录: |