Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71873

Git fetch randomly fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • git-client-plugin
    • None

      Very often the checkout phase of my projects fails, here's a failed build output:
       

      The recommended git tool is: NONE
      using credential 278920d0-23b6-4e18-9b46-352b0d302783
       > git.exe rev-parse --resolve-git-dir C:\Users\EmmedueI\AppData\Local\Jenkins\.jenkins\workspace\my-company_my-project_master\.git # timeout=10
      Fetching changes from the remote Git repository
       > git.exe config remote.origin.url https://github.com/my-company/my-project.git # timeout=10
      Fetching without tags
      Fetching upstream changes from https://github.com/my-company/my-project.git
       > git.exe --version # timeout=10
       > git --version # 'git version 2.41.0.windows.3'
      using GIT_ASKPASS to set credentials  jenkins-app-new
       > git.exe fetch --no-tags --force --progress -- https://github.com/my-company/my-project.git +refs/heads/master:refs/remotes/origin/master # timeout=10
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from https://github.com/my-company/my-project.git
      	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:999)
      	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1241)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: hudson.plugins.git.GitException: Command "git.exe fetch --no-tags --force --progress -- https://github.com/my-company/my-project.git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
      stdout: 
      stderr: remote: Invalid username or password.
      fatal: Authentication failed for 'https://github.com/my-company/my-project.git/'
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2842)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
      	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:997)
      	... 11 more
      

       

      If I manually re-run the build, either from Jenkins or from Github, most of the time the checkout is fine.
       

            Unassigned Unassigned
            nicolaisotta Nicola Isotta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: