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)

          Mark Waite added a comment -

          Please don't use bug reports for authentication issues. They are almost always configuration errors from the user rather than issues in the plugin.

          The Jenkins users mailing list is much more helpful with authentication issues, since there are many more people reading the Jenkins user mailing list than read the bug reports for the git plugin.

          I regularly test private repository access to BitBucket, GitLab, GitHub, and Assembla repositories from Windows and Linux machines using both https (username / password) and ssh (private key) based access to those repositories. It is a standard part of the automated tests I execute regularly as well.

          Mark Waite added a comment - Please don't use bug reports for authentication issues. They are almost always configuration errors from the user rather than issues in the plugin. The Jenkins users mailing list is much more helpful with authentication issues, since there are many more people reading the Jenkins user mailing list than read the bug reports for the git plugin. I regularly test private repository access to BitBucket, GitLab, GitHub, and Assembla repositories from Windows and Linux machines using both https (username / password) and ssh (private key) based access to those repositories. It is a standard part of the automated tests I execute regularly as well.

          Hi,

          I am experiencing the same sort of issue while fetching the source code from the remote GIT repository, please do let me know if any work around to over come this issue.

          It will be much appreciated if i get valuable inputs and assistance on the same.

          Regards,
          Richi

          Richi Nixon Vineetha Babu added a comment - Hi, I am experiencing the same sort of issue while fetching the source code from the remote GIT repository, please do let me know if any work around to over come this issue. It will be much appreciated if i get valuable inputs and assistance on the same. Regards, Richi

          Mark Waite added a comment -

          r_vineethababu refer to the preceding comment. This is not the place to request help with authentication issues.

          Mark Waite added a comment - r_vineethababu refer to the preceding comment . This is not the place to request help with authentication issues.

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

              Created:
              Updated:
              Resolved: