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

Jenkins fails to fetch from remote repo (BitBucket and GitLab)

      I am trying to run the Jenkins job for data migration and the remote repository which is configured in my Jenkins job is a BitBucket private repository. It fails to fetch from the repository if it's private however works smooth with public ones. I have posted the error message that I am getting. Any kind of help on this issue would be appreciated. Thank you!

      Also, I have tried the following techniques to achieve the same but to no avail.
      Username with password, SSH key with and without passphrase, changing the working directory,

      Started by user Akshaya Appaswamy
      Building in workspace C:\Program Files (x86)\Jenkins\workspace\WinZonePOC
      > git.exe rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > git.exe config remote.origin.url https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git # timeout=10
      Fetching upstream changes from https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git
      > git.exe --version # timeout=10
      using GIT_SSH to set credentials
      > git.exe fetch --tags --progress https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git +refs/heads/:refs/remotes/origin/
      ERROR: Timeout after 10 minutes
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
      at hudson.scm.SCM.checkout(SCM.java:495)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      at hudson.model.Run.execute(Run.java:1720)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)
      Caused by: hudson.plugins.git.GitException: Command "git.exe fetch --tags --progress https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git +refs/heads/:refs/remotes/origin/" returned status code -1:
      stdout:
      stderr:
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1745)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1489)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:801)
      ... 11 more
      ERROR: null
      Finished: FAILURE

          [JENKINS-40233] Jenkins fails to fetch from remote repo (BitBucket and GitLab)

          Akshaya Appaswamy created issue -
          Akshaya Appaswamy made changes -
          Epic Link New: JENKINS-35757 [ 171774 ]
          Akshaya Appaswamy made changes -
          Issue Type Original: Bug [ 1 ] New: Task [ 3 ]
          Akshaya Appaswamy made changes -
          Description Original: I am trying to run the Jenkins job for data migration and the remote repository which is configured in my Jenkins job is a BitBucket private repository. It fails to fetch from the repository if it's private however works smooth with a public ones. I have posted the error message that I am getting. Any kind of help on this issue would be appreciated. Thank you!

          Started by user Akshaya Appaswamy
          Building in workspace C:\Program Files (x86)\Jenkins\workspace\WinZonePOC
           > git.exe rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > git.exe config remote.origin.url https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git # timeout=10
          Fetching upstream changes from https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git
           > git.exe --version # timeout=10
          using GIT_SSH to set credentials
           > git.exe fetch --tags --progress https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git +refs/heads/*:refs/remotes/origin/*
          ERROR: Timeout after 10 minutes
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
          at hudson.scm.SCM.checkout(SCM.java:495)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          at hudson.model.Run.execute(Run.java:1720)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: hudson.plugins.git.GitException: Command "git.exe fetch --tags --progress https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
          stdout:
          stderr:
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1745)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1489)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:801)
          ... 11 more
          ERROR: null
          Finished: FAILURE
          New: I am trying to run the Jenkins job for data migration and the remote repository which is configured in my Jenkins job is a BitBucket private repository. It fails to fetch from the repository if it's private however works smooth with public ones. I have posted the error message that I am getting. Any kind of help on this issue would be appreciated. Thank you!

          Also, I have tried the following techniques to achieve the same but to no avail.
          Username with password, SSH key with and without passphrase, changing the working directory,

          Started by user Akshaya Appaswamy
          Building in workspace C:\Program Files (x86)\Jenkins\workspace\WinZonePOC
           > git.exe rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > git.exe config remote.origin.url https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git # timeout=10
          Fetching upstream changes from https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git
           > git.exe --version # timeout=10
          using GIT_SSH to set credentials
           > git.exe fetch --tags --progress https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git +refs/heads/*:refs/remotes/origin/*
          ERROR: Timeout after 10 minutes
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
          at hudson.scm.SCM.checkout(SCM.java:495)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          at hudson.model.Run.execute(Run.java:1720)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: hudson.plugins.git.GitException: Command "git.exe fetch --tags --progress https://akshaya1993@bitbucket.org/saitharunn7/winzonepoc.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
          stdout:
          stderr:
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1745)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1489)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:801)
          ... 11 more
          ERROR: null
          Finished: FAILURE
          Mark Waite made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Stephen Connolly made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            stephenconnolly Stephen Connolly
            akshaya1993 Akshaya Appaswamy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: