【问题标题】:Invalid credential error on jenkins while pulling a github project拉 github 项目时詹金斯出现无效凭证错误
【发布时间】:2019-05-14 21:59:26
【问题描述】:

我在 docker 容器中有一个 Jenkins 2.150.1。要安装这个 Jenkins,我只需使用 jenkinsci/blueocean:1.9.0 映像。

我创建了一个管道,然后尝试使用我的 GitHub 凭证在私人仓库上做一些 jenkins 的事情。但是,我收到以下错误:

Scan Repository Log

Started
[Thu Dec 13 15:09:49 GMT 2018] Starting branch indexing...
15:09:49 Connecting to https://api.github.com using Noon/****** (Another try)
ERROR: [Thu Dec 13 15:09:50 GMT 2018] Could not update folder level actions from source 7230f2ea-dac0-4018-819a-3bc105b6850f
hudson.AbortException: Invalid scan credentials when using Noon/****** (Another try) to connect to  Owner/Repo on https://api.github.com
    at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieveActions(GitHubSCMSource.java:1672)
    at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:765)
    at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:591)
    at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
    at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
    at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1025)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
[Thu Dec 13 15:09:50 GMT 2018] Finished branch indexing. Indexing took 0.5 sec
FATAL: Invalid scan credentials when using Noon/****** (Another try) to connect to  Owner/Repo on https://api.github.com
Finished: FAILURE

我以为我的凭据出错了,我重新输入了它。然后再次。然后再次。我现在非常确信我的证书完全没问题,但问题出在别的地方。我确实发现了一些具有类似问题的旧错误报告,但问题早已得到解决。

【问题讨论】:

  • 今天早上我在一份新工作和一个新的 Jenkins 实例上遇到了这个问题几个小时,凭据绝对是正确的,因为他们正在为其他工作工作。无论如何,我放弃了凭据,重新创建它们并解决了问题,不知道根本原因。

标签: docker jenkins github


【解决方案1】:

尽管我在发布此消息之前解决了此问题,但我还是决定发布并自行回答,因为这真的很难弄清楚。

这不是日志记录问题,这是空间问题!

当我指定 Jenkins 应该去哪里拉取源时,我输入了项目的所有者,我输入了“所有者”而不是“所有者”。詹金斯没有抱怨,仍然能够自动完成“回购”部分。问题只是后来才出现并提示这个,很误导的,错误信息。

这可能是一个应该报告的错误,但我不知道在哪里以及如何报告。

【讨论】:

    【解决方案2】:

    我在“所有者”字段中输入的名称无效,即使已填充存储库下拉列表。

    我更新为使用我的组织的名称(根据 GitHub 网址 - https://github.com/{org name}/{repo}),然后 Jenkins 能够扫描 repo。

    下一个问题,jenkinsfile 的路径不能以'/'开头。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-07
      • 2012-08-18
      • 2017-11-13
      • 1970-01-01
      • 1970-01-01
      • 2015-03-05
      • 1970-01-01
      • 2012-12-06
      相关资源
      最近更新 更多