- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我遇到了错误
"Please provide credentials for: https://jbright.pkgs.visualstudio.com/Project/_packaging/Project_Feed/nuget/v3/index.json"
当我运行命令时来自 Visual Studio 2019 Community Powershell:
nuget push -Source https://jbright.pkgs.visualstudio.com/Project/_packaging/Project_Feed/nuget/v3/index.json -ApiKey az C:\Users\Jens\source\repos\Project\Packed\Project.Core.0.4.0.7.nupkg
我已经尝试了我能够在网上找到的解决此问题的方法,包括:
我在项目目录中有一个 nuget.config 文件,其中包含:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="Core_Feed" value="https://jbright.pkgs.visualstudio.com/Project/_packaging/Project_Feed/nuget/v3/index.json" />
</packageSources>
</configuration>
<!--
nuget push -Source https://jbright.pkgs.visualstudio.com/Project/_packaging/Project_Feed/nuget/v3/index.json -ApiKey az C:\Users\Jens\source\repos\Project\Packed\Project.Core.0.4.0.7.nupkg
-->
我在文件中保留了 powershell 命令语法,这样我就不会忘记它,但是如您所见,它已被注释掉。问题是,这在我的笔记本电脑上使用相同的文件运行良好。
当我删除凭据管理器中的凭据,然后从此 Azure DevOps 源中提取程序包时,我得到了程序包并看到了添加到 Windows 的新凭据。但即使如此,我也无法在不收到“请提供凭据”错误的情况下将包发送到提要。
知道如何解决这个问题吗?谢谢,延斯
最佳答案
When I delete the credentials in credential manager and then pull packages from this Azure DevOps feed, I get the packages and see the new credentials added to Windows. But even so, I cannot pucs a package to the feed without getting the "Please provide credentials' error.
首先,请尝试使用来自 this link 的最新版本的 nuget.exe cli然后将 nuget.exe cli
路径从本地代理配置到系统环境变量 PATH。
其次,您应该在 Nuget.config
文件中为您的私有(private) nuget 包源添加 packageSourceCredentials
:
<packageSourceCredentials>
<Core_Feed>
<add key="Username" value="xxx" />
<add key="Password" value="xxx" />
xxx
</Core_Feed>
</packageSourceCredentials>
更多信息可以引用this link .
然后,测试您是否可以推送您的 nuget 包。
关于powershell - 请提供凭据错误推送到 Azure DevOps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61528818/
我是一名优秀的程序员,十分优秀!