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.

  • No sure if this is as github-plugin issue or if this plugin is relying on some other git API. But for {{private}} repositories, when I configure the {{Branches to build - Branch Specifier}} to anything that is no empty or {{***}} (ie. refs/heads/*) , {{GitHub Hook Log}} shows the following error and the jobs does not get triggered: {code} Started on 16/10/2015 2:11:40 PM Using strategy: Default [poll] Last Built Revision: Revision 9d1d66939474b01048ec2cdc8c5cd60b7438606d (origin/develop) using .gitcredentials to set credentials > git --version # timeout=10 > git init /var/tmp/hudson979795132853035389tmp # timeout=10 > git config --local credential.username buildboy2 # timeout=10 > git config --local credential.helper store --file=/var/tmp/git1493121951203369777.credentials # timeout=10 > git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo # timeout=10 > git config --local --remove-section credential # timeout=10 FATAL: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found hudson.util.IOException2: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:529) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381) at hudson.scm.SCM.poll(SCM.java:398) at hudson.model.AbstractProject._poll(AbstractProject.java:1454) at hudson.model.AbstractProject.poll(AbstractProject.java:1357) at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73) at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:99) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1282) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1273) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2376) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:583) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527) ... 13 more Done. Took 0.17 sec No changes {code} *Note1:* I have tried all the combination described in the help of {{Branches to build - Branch Specifier}} {code} refs/heads/* refs/heads/master origin/master origin/* master {code} They all come with the same issues. If I leave that empty or I set it to {{**}} this starts to work as expected. *Note2:* If I leave the branch speccifier set to {{refs/head/master}} and I convert my {{private}} repo into a {{public}} in github this works fine, no error found and the job is triggered correctly Please let me know if you need more information
    via by Federico Naum,
  • SCM Poll fails using pipeline
    via by Nick Witkowski,
  • Anyone seem this issue before? Jenkins ver. 1.565.3 GIT client plugin - 1.17.1 Git plugin - 2.2.12 GitHub plugin - 1.11.3 GitHub pull request builder - 1.20 GitHub API plugin - 1.67 Failed to connect to repository : Command "git -c core.askpass=true ls-remote -h git@github.com:xxxxxxxxxxxxxxxxxx.git HEAD" returned status code 128: stdout: stderr: fatal: failed to stat '.': Permission denied --- here's the git pollling log --- Started on Jul 13, 2015 3:01:00 PM Using strategy: Default [poll] Last Built Revision: Revision ad1ddc6a848d6353c52bb1e3112bcff58a9c68e0 (refs/remotes/xxxxxx/master) > git --version # timeout=10 > git -c core.askpass=true ls-remote -h git@github.com:xxxxxxxxxxxxxxxxxxxxx.git master # timeout=10 FATAL: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h git@github.com:xxxxxxxxxxxxxxxxxxxxx.git master" returned status code 128: stdout: stderr: fatal: failed to stat '.': Permission denied hudson.util.IOException2: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h git@github.com:xxxxxxxxxxxxxxxxxxxxx.git master" returned status code 128: stdout: stderr: fatal: failed to stat '.': Permission denied at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:496) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject._poll(AbstractProject.java:1428) at hudson.model.AbstractProject.poll(AbstractProject.java:1331) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:477) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:506) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h git@github.com:xxxxxxxxxxxxxxxxxxxxx.git master" returned status code 128: stdout: stderr: fatal: failed to stat '.': Permission denied at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1277) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1268) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2355) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:530) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:494) ... 12 more Done. Took 28 ms No changes ----
    via by Guang Su,
  • using GIT_SSH to set credentials ??-?? > /usr/bin/git ls-remote -h ssh://git@****.git docker # timeout=10 FATAL: hudson.plugins.git.GitException: Command "/usr/bin/git ls-remote -h ssh://git@****.git docker" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. hudson.util.IOException2: hudson.plugins.git.GitException: Command "/usr/bin/git ls-remote -h ssh://git@****.git docker" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:475) at hudson.scm.SCM.poll(SCM.java:401) at hudson.model.AbstractProject._poll(AbstractProject.java:1429) at hudson.model.AbstractProject.poll(AbstractProject.java:1332) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git ls-remote -h ssh://git@****.git docker" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1437) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1225) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1138) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1129) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2059) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:509) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:473) ... 11 more Done. Took 73 ms No changes
    via by chenghong oyang,
  • Reproduction: * Take a working job with Git SCM Polling enabled (with the fast / "ls-remote" method) * Provoke an error in the origin response (e.g. see Log below) * Git Polling ends with "No changes" * (x) The Job stays at "blue" (successful) although the Polling clearly had errors --> the not working job might stay undiscovered quite long Git Polling Log: {code} Started on Jan 31, 2016 10:00:00 PM Using strategy: Default [poll] Last Built Revision: Revision 1231223345345345345345345345345345345543 (refs/remotes/origin/master) using GIT_SSH to set credentials SSH Key for someUser > git --version # timeout=10 > git -c core.askpass=true ls-remote -h ssh://someUser@localhost/example-projects/example1 # timeout=10 FATAL: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h ssh://someUser@localhost/example-projects/example1" returned status code 128: stdout: stderr: fatal: Project not found: example-projects/example1 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. hudson.util.IOException2: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h ssh://someUser@localhost/example-projects/example1" returned status code 128: stdout: stderr: fatal: Project not found: example-projects/example1 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:529) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381) at hudson.scm.SCM.poll(SCM.java:398) at hudson.model.AbstractProject._poll(AbstractProject.java:1452) at hudson.model.AbstractProject.poll(AbstractProject.java:1355) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:510) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:539) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h ssh://someUser@localhost/example-projects/example1" returned status code 128: stdout: stderr: fatal: Project not found: example-projects/example1 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1693) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1441) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1335) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1326) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2435) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:583) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527) ... 12 more Done. Took 0.42 sec No changes {code}
    via by Michael F.,
    • hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe ls-remote -h <a href="https://suma@bitbucket.org/suma/bitbucketjenkins01.git" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://suma@bitbucket.org/suma/bitbucketjenkins01.git</a>" returned status code -1:<br> stdout: <br> stderr: <br> java.io.IOException: hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe ls-remote -h <a href="https://suma@bitbucket.org/suma/bitbucketjenkins01.git" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://suma@bitbucket.org/suma/bitbucketjenkins01.git</a>" returned status code -1:<br> stdout: <br> stderr: <br> at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:574) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391) at hudson.scm.SCM.poll(SCM.java:408) at hudson.model.AbstractProject._poll(AbstractProject.java:1460) at hudson.model.AbstractProject.poll(AbstractProject.java:1363) at com.cloudbees.jenkins.plugins.BitBucketTrigger$1.runPolling(BitBucketTrigger.java:62) at com.cloudbees.jenkins.plugins.BitBucketTrigger$1.run(BitBucketTrigger.java:87) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe ls-remote -h <a href="https://suma@bitbucket.org/suma/bitbucketjenkins01.git" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://suma@bitbucket.org/suma/bitbucketjenkins01.git</a>" returned status code -1:<br> stdout: <br> stderr: <br> at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1495) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1419) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1410) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2463) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:613) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:572) ... 13 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    2 more bugmates