英文:
Pulumi: "pulumi plugin install resource kubernetes" fails
问题
我有一个小的Go应用程序,它为我创建YAML资源,然后我将其部署到Kubernetes集群中。
它之前一直运行得很好,但是几个小时前开始出现错误:
> 错误:无法自动下载和安装资源插件 'pulumi-resource-kubernetes',请使用 pulumi plugin install resource kubernetes
命令安装插件。
底层错误:从 https://api.github.com/repos/pulumi/pulumi-kubernetes/releases/latest 获取插件时出现 401 HTTP 错误。
手动执行 pulumi plugin install resource kubernetes
命令返回相同的结果:
> 错误:从 https://api.github.com/repos/pulumi/pulumi-kubernetes/releases/latest 获取插件时出现 401 HTTP 错误。
我不知道出了什么问题;我无法理解这个错误消息,也没有更多的详细信息可用 - 就我所见。链接(https://api.github.com/repos/pulumi/pulumi-kubernetes/releases/latest)似乎正常工作。如果GitHub API的限制是原因,我不知道在哪里放置API密钥。
我正在运行MacOS Ventura 13.1 (22C65),使用的是2019年的MacBook Pro。这里没有最近的更改。Go的版本是1.19,库是github.com/pulumi/pulumi-kubernetes/sdk/v3 v3.24.1
非常感谢任何提示。
英文:
I have a little Go app which creates YAML ressources for me I then deploy to a Kubernetes cluster.
It worked quite well but since some hours (?) it fails saying:
> error: Could not automatically download and install resource plugin 'pulumi-resource-kubernetes', install the plugin using pulumi plugin install resource kubernetes
.
Underlying error: 401 HTTP error fetching plugin from https://api.github.com/repos/pulumi/pulumi-kubernetes/releases/latest
Executing pulumi plugin install resource kubernetes
manually returns the same result:
> error: 401 HTTP error fetching plugin from https://api.github.com/repos/pulumi/pulumi-kubernetes/releases/latest
I have no idea what's wrong; I don't really get the message and more detail is not available - as far as I can see. The link (https://api.github.com/repos/pulumi/pulumi-kubernetes/releases/latest) seems to work properly. If a GitHub API throttle is the reason, I don't see where to place an API key.
I am running MacOS Ventura 13.1 (22C65) on a MacBook Pro 2019. No recent changes here. Go has version 1.19 and the lib is github.com/pulumi/pulumi-kubernetes/sdk/v3 v3.24.1
Any hint is highly appreciated.
答案1
得分: 1
这个问题可以通过在GITHUB_TOKEN
环境变量中提供有效的GitHub API令牌来解决。
非常感谢Christian Nunciato的提示。
然而,如果有人对此事的背景和为什么会如此令人惊讶有所了解,我会非常感兴趣听听一些见解和解释。
英文:
The issue can be solved by providing a valid GitHub API token via the GITHUB_TOKEN
environment variable.
Thanks a lot Christian Nunciato for the hint.
However, if anybody knows some background about this and why this happened so surprisingly, I would be very interested in some insights/explanations.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论