nuget - nuget 的 GitHub Packages 服务身份验证问题

所以我在使用 dotnet 工具时开始看到这个错误:

/usr/local/share/dotnet/sdk/6.0.100/NuGet.targets(130,5): warning : Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.

我在这方面看到的资源通常指向管道问题,但对我而言并非如此。

最佳答案

不确定是什么触发了这个或为什么这为我解决了这个问题,但如果我禁用并重新启用我的 nuget 源它对我有用。

dotnet nuget list source

应该返回这样的东西:

Registered Sources:
  1.  nuget.org [Enabled]
      https://api.nuget.org/v3/index.json

然后你想禁用并重新启用它:

dotnet nuget disable source nuget.org
dotnet nuget enable source nuget.org

https://stackoverflow.com/questions/70450361/

相关文章:

git - 我无法在 aws sagemaker notebook 实例上安装 "git-lfs"

c++ - 当变量不是局部变量时我应该继续返回吗

typescript - TypeScript 中的泛型类型参数 T 是什么?

amazon-web-services - AWS S3 : Why Public object d

rust - @ operator bindings over extra conditionals

regex - 只查找多行 C 注释,不查找单行 C 注释

rust - Substrate - 在此范围内找不到类型 `Vec`

python - 压缩文件 : Check for correct Password

vue.js - 有没有办法在 Vue 3 Composition API 中的随机组件之间共享 r

javascript - 如何在项目的特定子目录上运行 prettier?