简体   繁体   English

如何在从 DevOps 提取的解决方案中使用 DevOps nuget package

[英]How to use DevOps nuget package in solution pulled from DevOps

I am verified in DevOps using an ssh key (at least for git)我在 DevOps 中使用 ssh 密钥进行了验证(至少对于 git)

So I pulled a solution from mycompany@vs-ssh.visualstudio.com:v3/mycompany/thing/thing , and tried to build it using dotnet build , but get the error所以我从mycompany@vs-ssh.visualstudio.com:v3/mycompany/thing/thing中提取了一个解决方案,并尝试使用dotnet build构建它,但得到错误

/usr/local/share/dotnet/sdk/3.1.402/NuGet.targets(128,5): error: Unable to load the service index for source https://mycompany.pkgs.visualstudio.com/_packaging/SomeProject/nuget/v3/index.json . /usr/local/share/dotnet/sdk/3.1.402/NuGet.targets(128,5):错误:无法加载源https://mycompany.pkgs.visualstudio.com/_packaging/SomeProject/的服务索引nuget/v3/index.json /usr/local/share/dotnet/sdk/3.1.402/NuGet.targets(128,5): error: Response status code does not indicate success: 401 (Unauthorized). /usr/local/share/dotnet/sdk/3.1.402/NuGet.targets(128,5):错误:响应状态码不表示成功:401(未授权)。

How can I get around this (I assume by authenticating with the sources server) and build the project?我怎样才能解决这个问题(我假设通过源服务器进行身份验证)并构建项目?

Please install Azure Artifacts Credential Provider and once you do it run dotnet restore --interactive and then you will be prompted to login to a page like below:请安装Azure Artifacts Credential Provider ,安装完成后运行dotnet restore --interactive然后系统会提示您登录到如下页面:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM