git Jenkins GitHub 插件无法选择我的凭据
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36500729/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jenkins GitHub plugin can't choose my credentials
提问by ZEE
I got very strange behavior that has never happened before, when I try to configure the GitHub server in Jenkins general configuration to set up webhooks auto.
当我尝试在 Jenkins 常规配置中配置 GitHub 服务器以设置 webhooks auto 时,我遇到了以前从未发生过的非常奇怪的行为。
The drop down menu doesn't display my registered credentials. I was always be able to do that, but suddenly I don't know what's happening. I tried to uninstall the plugin, restarting Jenkins, kill the Jenkins Docker container and configure all the stuff again ... still I got the same issue.
下拉菜单不显示我注册的凭据。我总是能够做到这一点,但突然间我不知道发生了什么。我试图卸载插件,重新启动 Jenkins,杀死 Jenkins Docker 容器并再次配置所有东西......我仍然遇到同样的问题。
There is no other option other than none, and when I add new credentials I still get Noneas the only option...
除了无之外别无选择,当我添加新凭据时,我仍然将无作为唯一选项......
采纳答案by Hilborn
The issue is that the GitHub plugin only accepts plain text credentials.
问题是 GitHub 插件只接受纯文本凭证。
The GitHub access token can be created manually, or automatically via the Advanced... options as described here.
GitHub 访问令牌可以手动创建,也可以通过此处所述的高级...选项自动创建。
In case you already have an access token in GitHub (you'll get an error in Jenkins), you can remove it in Github. Then you can let Jenkins generate the token and select it in the Credentials menu.
如果您已经在 GitHub 中拥有访问令牌(您将在 Jenkins 中收到错误),您可以在 Github 中将其删除。然后你可以让 Jenkins 生成令牌并在 Credentials 菜单中选择它。