Hi there, thank you for Jenkins!
Tried to search for similar issues here, didn’t find anything.
I followed this video:
and this (similar) guide:
to create a Jenkins Organization Folder connected to a GitHub organization. In this organization I have several private repos. In one of them I have a Jenkinsfile with a simple echo command, like in the video.
When I scan for repositories, all the repos are found and the one with the Jenkinsfile appears in the list of repositories in Jenkins. Up to here, all good.
However, the build for that repository fails with the output below. Why the “ERROR: Error cloning remote repo ‘origin’”, while access to the repository exists and the Jenkinsfile is evaluated properly?
I followed the exact steps shown in the video, the problem doesn’t appear there. Is there something I’m missing? I know that the video was shot before GitHub cancelled password authentication, but I don’t see any relation since GitHub app has the content (read only) permission.
If anyone could help me heading to the right direction, it would be great. Thanks for your attention.
Build console output:
Branch indexing
14:31:43 Connecting to https://api.github.com using 1312.../****** (jenkins-github-MyOrg-CI-CD)
Obtained Jenkinsfile from 80ca8821e769...
[Pipeline] Start of Pipeline
[Pipeline] node
Running on test.cicd.build.node
in /home/jenkins/agent/workspace/CD-test_tmpl-webapp_master
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
The recommended git tool is: NONE
using credential jenkins-github-MyOrg-CI-CD
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --no-tags --force --progress -- https://github.com/MyOrg-CI-CD-test/tmpl-webapp.git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
stdout:
stderr: remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/MyOrg-CI-CD-test/tmpl-webapp.git/'
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2852)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2188)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:638)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:880)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:173)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:164)
at hudson.remoting.UserRequest.perform(UserRequest.java:225)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:391)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:138)
at java.base/java.lang.Thread.run(Thread.java:840)
Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to test.cicd.build.node
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1916)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:384)
at hudson.remoting.Channel.call(Channel.java:1108)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:155)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:140)
at PluginClassLoader for git-client/jdk.proxy70/jdk.proxy70.$Proxy163.execute(Unknown Source)
at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1221)
at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1311)
at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:49)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
... 1 more
ERROR: Error cloning remote repo 'origin'
ERROR: Maximum checkout retry attempts reached, aborting
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Error cloning remote repo 'origin'
Cloning repository h t t p s : / / github.com/MyOrg-CI-CD-test/tmpl-webapp.git
> git init /home/jenkins/agent/workspace/CD-test_tmpl-webapp_master # timeout=10
Fetching upstream changes from h t t p s : / / github.com/MyOrg-CI-CD-test/tmpl-webapp.git
> git --version # timeout=10
> git --version # 'git version 2.39.5'
using GIT_ASKPASS to set credentials jenkins-github-MyOrg-CI-CD
> git fetch --no-tags --force --progress -- h t t p s : / /github.com/MyOrg-CI-CD-test/tmpl-webapp.git +refs/heads/master:refs/remotes/origin/master # timeout=10
GitHub has been notified of this commit’s build result
Finished: FAILURE
Jenkins setup:
Jenkins: 2.504.1 OS: Linux - 6.1.0-37-amd64 Java: 17.0.15 - Debian (OpenJDK 64-Bit Server VM) --- antisamy-markup-formatter:173.v680e3a_b_69ff3 apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83 asm-api:9.8-135.vb_2239d08ee90 bootstrap5-api:5.3.5-1 bouncycastle-api:2.30.1.80-261.v00c0e2618ec3 branch-api:2.1217.v43d8b_b_d8b_2c7 build-timeout:1.38 caffeine-api:3.2.0-166.v72a_6d74b_870f checks-api:370.vb_61a_c57328f3 cloudbees-folder:6.1012.v79a_86a_1ea_c1f commons-lang3-api:3.17.0-87.v5cf526e63b_8b_ commons-text-api:1.13.1-176.v74d88f22034b_ credentials:1415.v831096eb_5534 credentials-binding:687.v619cb_15e923f dark-theme:524.vd675b_22b_30cb_ dashboard-view:2.528.v3470c02b_d7c9 display-url-api:2.209.v582ed814ff2f durable-task:587.v84b_877235b_45 echarts-api:5.6.0-4 email-ext:1876.v28d8d38315b_d font-awesome-api:6.7.2-1 git:5.7.0 git-client:6.1.3 github:1.43.0 github-api:1.321-488.v9b_c0da_9533f8 github-branch-source:1815.v9152b_2ff7a_1b_ gson-api:2.13.1-139.v4569c2ef303f instance-identity:203.v15e81a_1b_7a_38 ionicons-api:88.va_4187cb_eddf1 jackson2-api:2.19.0-404.vb_b_0fd2fea_e10 jakarta-activation-api:2.1.3-2 jakarta-mail-api:2.1.3-2 javax-activation-api:1.2.0-8 jaxb:2.3.9-133.vb_ec76a_73f706 jjwt-api:0.11.5-120.v0268cf544b_89 joda-time-api:2.14.0-127.v7d9da_295a_d51 jquery3-api:3.7.1-3 json-api:20250107-125.v28b_a_ffa_eb_f01 json-path-api:2.9.0-148.v22a_7ffe323ce junit:1335.v6b_a_a_e18534e1 mailer:489.vd4b_25144138f matrix-project:849.v0cd64ed7e531 metrics:4.2.30-471.v55fa_495f2b_f5 mina-sshd-api-common:2.15.0-161.vb_200831a_c15b_ mina-sshd-api-core:2.15.0-161.vb_200831a_c15b_ okhttp-api:4.11.0-189.v976fa_d3379d6 pipeline-build-step:567.vea_ce550ece97 pipeline-graph-analysis:237.v2b_75640ca_888 pipeline-graph-view:537.vde3718920423 pipeline-groovy-lib:752.vdddedf804e72 pipeline-input-step:517.vf8e782ee645c pipeline-milestone-step:138.v78ca_76831a_43 pipeline-model-api:2.2255.v56a_15e805f12 pipeline-model-definition:2.2255.v56a_15e805f12 pipeline-model-extensions:2.2255.v56a_15e805f12 pipeline-stage-step:322.vecffa_99f371c pipeline-stage-tags-metadata:2.2255.v56a_15e805f12 plain-credentials:195.vb_906e9073dee plugin-util-api:6.1.0 resource-disposer:0.25 scm-api:704.v3ce5c542825a_ script-security:1373.vb_b_4a_a_c26fa_00 snakeyaml-api:2.3-125.v4d77857a_b_402 ssh-credentials:355.v9b_e5b_cde5003 structs:343.vdcf37b_a_c81d5 theme-manager:294.vf2c2fd783821 timestamper:1.29 token-macro:444.v52de7e9c573d variant:70.va_d9f17f859e0 workflow-aggregator:608.v67378e9d3db_1 workflow-api:1373.v7b_813f10efa_b_ workflow-basic-steps:1079.vce64b_a_929c5a_ workflow-cps:4106.v7a_8a_8176d450 workflow-durable-task-step:1405.v1fcd4a_d00096 workflow-job:1520.v56d65e3b_4566 workflow-multibranch:806.vb_b_688f609ee9 workflow-scm-step:437.v05a_f66b_e5ef8 workflow-step-api:700.v6e45cb_a_5a_a_21 workflow-support:968.v8f17397e87b_8 ws-cleanup:0.48