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

Jenkins intermittently fails to fetch from remote git

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • git-plugin
    • None

      Our Jenkins builds are intermittently failing with error code "128." However, when we manually trigger the build again, it runs successfully.

      Failure message:

      10:35:19  using credential xyz
      10:35:19   > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/Deployment - SupEnv - ClientSandbox@script/8efe452fb0e8141c19cd47dc992d1a144fbe5d21dd8de6beb27b3ab0e2ee25ff/.git # timeout=10
      10:35:19  Fetching changes from the remote Git repository
      10:35:19   > git config remote.origin.url https://bitbucket.athenahealth.com/scm/deploy/automated-deploy.git # timeout=10
      10:35:19  Fetching upstream changes from https://bitbucket.athenahealth.com/scm/deploy/automated-deploy.git
      10:35:19   > git --version # timeout=10
      10:35:19   > git --version # 'git version 2.39.2'
      10:35:19  using GIT_ASKPASS to set credentials 
      10:35:19   > git fetch --tags --force --progress -- https://bitbucket.athenahealth.com/scm/deploy/automated-deploy.git +refs/heads/*:refs/remotes/origin/* # timeout=10
      10:35:20  ERROR: Error fetching remote repo 'origin'
      10:35:20  hudson.plugins.git.GitException: Failed to fetch from https://bitbucket.athenahealth.com/scm/deploy/automated-deploy.git
      10:35:20  	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:999)
      10:35:20  	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1241)
      10:35:20  	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
      10:35:20  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      10:35:20  	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:165)
      10:35:20  	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:71)
      10:35:20  	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
      10:35:20  	at hudson.model.ResourceController.execute(ResourceController.java:101)
      10:35:20  	at hudson.model.Executor.run(Executor.java:442)
      10:35:20  Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- https://bitbucket.athenahealth.com/scm/deploy/automated-deploy.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
      10:35:20  stdout: 
      10:35:20  stderr: fatal: Authentication failed for 'https://bitbucket.athenahealth.com/scm/deploy/automated-deploy.git/'
      10:35:20  
      10:35:20  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2842)
      10:35:20  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
      10:35:20  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
      10:35:20  	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:997)
      10:35:20  	... 8 more
      10:35:20  ERROR: Error fetching remote repo 'origin'
      10:35:20  ERROR: Maximum checkout retry attempts reached, aborting
      10:35:20  Finished: FAILUR 

            Unassigned Unassigned
            kmaran Maran
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: