【问题标题】:Jenkins Github Pull Request Builder Plugin throwing user authentication errorJenkins Github Pull Request Builder Plugin 引发用户身份验证错误
【发布时间】:2021-06-02 18:06:05
【问题描述】:

我正在为我的 Jenkins 使用 https://github.com/jenkinsci/ghprb-plugin 插件来在提出拉取请求时启动作业构建。 我得到以下错误 "无法连接到 GitHub API: org.kohsuke.github.HttpException: {"message":"Requires authentication","documentation_url":"https://docs.github.com/rest/reference/users#get-the -authenticated-user"}"

在 2 个不同的 Jenkins 上尝试了多个用户,问题仍然相同。

【问题讨论】:

  • 你是使用github密码还是access token进行认证?
  • Github 用户名和密码

标签: jenkins github devops


【解决方案1】:

现在您正在使用 github 用户名和密码。但是您需要使用 github 访问令牌而不是密码进行身份验证。您可以从settings -> Developer Settings -> Personal Access tokens -> Generate new token 创建访问令牌。

【讨论】:

  • 很高兴帮助兄弟:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-05-25
  • 1970-01-01
  • 2016-06-21
  • 2011-12-22
  • 1970-01-01
  • 2023-02-26
相关资源
最近更新 更多