hudson.plugins.git.GitException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We have a job which passes the GIT_URL as a string parameter, supplied by the user. When the user does a Copy + Paste into the value field, sometimes a trailing whitespace is included. This appears to mess the plugin up somehow. We are also using multiSCM, but I doubt it's related to the underlying issue. If the Git URL is configured in the job config, the trailing whitespace is automatically trimmed when the job configuration is saved into config.xml. So this is only an issue if the GIT_URL is provided as a parameter to the job. When the Git URL is a parameter, the whitespace is not trimmed, and the job fails during git fetch with the following log output: Cloning repository git://my/git/URL.git Fetching upstream changes from git://my/git/URL.git FATAL: Failed to fetch from git://my/git/URL.git hudson.plugins.git.GitException: Failed to fetch from git://my/git/URL.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java.623) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java.855) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118) at ... Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress git://my/git/URL.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: The remote end hung up unexpectedly at org.jenkinssci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1146) at ... Not a big deal, as long as we know to trim the whitespace manually.
    via by Jeff Thornsen,
  • We have a job which passes the GIT_URL as a string parameter, supplied by the user. When the user does a Copy + Paste into the value field, sometimes a trailing whitespace is included. This appears to mess the plugin up somehow. We are also using multiSCM, but I doubt it's related to the underlying issue. If the Git URL is configured in the job config, the trailing whitespace is automatically trimmed when the job configuration is saved into config.xml. So this is only an issue if the GIT_URL is provided as a parameter to the job. When the Git URL is a parameter, the whitespace is not trimmed, and the job fails during git fetch with the following log output: Cloning repository git://my/git/URL.git Fetching upstream changes from git://my/git/URL.git FATAL: Failed to fetch from git://my/git/URL.git hudson.plugins.git.GitException: Failed to fetch from git://my/git/URL.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java.623) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java.855) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118) at ... Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress git://my/git/URL.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: The remote end hung up unexpectedly at org.jenkinssci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1146) at ... Not a big deal, as long as we know to trim the whitespace manually.
    via by Jeff Thornsen,
  • The full error received is: {noformat} Fetching upstream changes from ssh://git@git.dev.faked:7999/re/core-binaries.git ERROR: Timeout after 10 minutes FATAL: Failed to fetch from ssh://git@git.dev.faked:7999/re/core-binaries.git hudson.plugins.git.GitException: Failed to fetch from ssh://git@git.dev.faked:7999/re/core-binaries.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:622) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:854) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:879) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117) at hudson.model.AbstractProject.checkout(AbstractProject.java:1411) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561) at hudson.model.Run.execute(Run.java:1665) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@git.dev.faked:7999/re/core-binaries.git +refs/heads/master:refs/remotes/core-binaries/master" returned status code 128: stdout: stderr: Could not create directory 'c/users/user/.ssh'. fatal: Could not read from remote repository. {noformat} The git server hardware had been upgraded from a VM to a physical machine with 24 cores and 16G of RAM. The repositories are pretty small, and the machine isn't under much load at all. No networking issues are evident. I am confident this is not a true timeout, but an actual hang. It is intermittent. It seems similar to the issue found here: http://stackoverflow.com/questions/10732940/git-operations-occasionally-hang-in-jenkins-on-windows It also seems like it could be related to https://issues.jenkins-ci.org/browse/JENKINS-21654. We are using the "cmd" directory instead of the "bin" directory, i.e. "C:\Program Files (x86)\Git\cmd\git.exe". The HOME environment variable is set to "c:\users\user" The c:\users\user\.ssh directory exists, and the permissions seem to be fine (besides, it's intermittent...) Our c:\users\user\.ssh\config file looks like this: {noformat} Host git.dev.faked StrictHostKeyChecking no UserKnownHostsFile NUL {noformat} We have multiple executors for our build machines, so it could be that another git command is locking the .ssh directory while it's working. However, the likelihood of locking the database for 10 minutes if very, very unlikely.
    via by Rob Duff,
  • I can't clone git repo on Jenkins Slave node via "ssh+git" protocol. Error: Building remotely on uk-world-jenk03 in workspace C:\Jenkins\workspace\project_win32 > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url git@gitlab.company.local:world/project.git # timeout=10 Fetching upstream changes from git@gitlab.company.local:world/project.git > git --version # timeout=10 using GIT_SSH to set credentials uk-world-jenk03 > git -c core.askpass=true fetch --tags --progress git@gitlab.company.local:world/project.git +refs/heads/*:refs/remotes/origin/* ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from git@gitlab.company.local:world/project.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:122) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress git@gitlab.company.local:world/project.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: plink: unknown option "-o" fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. plink really don't have option "-o".
    via by Sergei Antipov,
  • The full error received is: {noformat} Fetching upstream changes from ssh://git@git.dev.faked:7999/re/core-binaries.git ERROR: Timeout after 10 minutes FATAL: Failed to fetch from ssh://git@git.dev.faked:7999/re/core-binaries.git hudson.plugins.git.GitException: Failed to fetch from ssh://git@git.dev.faked:7999/re/core-binaries.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:622) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:854) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:879) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117) at hudson.model.AbstractProject.checkout(AbstractProject.java:1411) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561) at hudson.model.Run.execute(Run.java:1665) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@git.dev.faked:7999/re/core-binaries.git +refs/heads/master:refs/remotes/core-binaries/master" returned status code 128: stdout: stderr: Could not create directory 'c/users/user/.ssh'. fatal: Could not read from remote repository. {noformat} The git server hardware had been upgraded from a VM to a physical machine with 24 cores and 16G of RAM. The repositories are pretty small, and the machine isn't under much load at all. No networking issues are evident. I am confident this is not a true timeout, but an actual hang. It is intermittent. It seems similar to the issue found here: http://stackoverflow.com/questions/10732940/git-operations-occasionally-hang-in-jenkins-on-windows It also seems like it could be related to https://issues.jenkins-ci.org/browse/JENKINS-21654. We are using the "cmd" directory instead of the "bin" directory, i.e. "C:\Program Files (x86)\Git\cmd\git.exe". The HOME environment variable is set to "c:\users\user" The c:\users\user\.ssh directory exists, and the permissions seem to be fine (besides, it's intermittent...) Our c:\users\user\.ssh\config file looks like this: {noformat} Host git.dev.faked StrictHostKeyChecking no UserKnownHostsFile NUL {noformat} We have multiple executors for our build machines, so it could be that another git command is locking the .ssh directory while it's working. However, the likelihood of locking the database for 10 minutes if very, very unlikely.
    via by Rob Duff,
  • gRPC_interop_experiments is broken
    via GitHub by adelez
    ,
  • I can't clone git repo on Jenkins Slave node via "ssh+git" protocol. Error: Building remotely on uk-world-jenk03 in workspace C:\Jenkins\workspace\project_win32 > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url git@gitlab.company.local:world/project.git # timeout=10 Fetching upstream changes from git@gitlab.company.local:world/project.git > git --version # timeout=10 using GIT_SSH to set credentials uk-world-jenk03 > git -c core.askpass=true fetch --tags --progress git@gitlab.company.local:world/project.git +refs/heads/*:refs/remotes/origin/* ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from git@gitlab.company.local:world/project.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:122) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress git@gitlab.company.local:world/project.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: plink: unknown option "-o" fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. plink really don't have option "-o".
    via by Sergei Antipov,
  • Frequent ssh connection failure to github
    via by Unknown author,
    • hudson.plugins.git.GitException: Failed to fetch from git://my/git/URL.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java.623) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java.855) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,