Git plugin on Jenkins fails to check out with fetching errors

1,358 views
Skip to first unread message

Zk W

unread,
Jul 8, 2015, 10:34:23 PM7/8/15
to jenkins...@googlegroups.com
Hi All

Jenkins 1.519
Git client plugin 1.17.1
Git plugin 2.2.12
mailer 1.5
scm-api 0.2
ssh-credential 1.11
matrix-project - not installed

We configured the job to use a linux build slave where this slave's ssh key is setup and known to the Git Server abc.com

setup:

When trying to build with the job, we got the following errors:

[EnvInject] - Loading node environment variables.
Building remotely on slave_linux in workspace /home/zx/jenkins/slave/workspace/zx-test
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url g...@ss.abc.com/dev/test.git # timeout=10
Fetching upstream changes from g...@ss.abc.com/dev/test.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress g...@ss.abc.com/dev/test.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
ERROR: Error fetching remote repo 'origin'
Notifying upstream projects of job completion
Finished: FAILURE


Polling log shows:
Using strategy: Default
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repositories
 > git config remote.origin.url g...@ss.abc.com/dev/test.git # timeout=10
Fetching upstream changes from g...@ss.abc.com/dev/test.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress g...@ss.abc.com/dev/test.git +refs/heads/*:refs/remotes/origin/*
FATAL: Failed to fetch from g...@ss.abc.com/dev/test.git
hudson.util.IOException2: Failed to fetch from g...@ss.abc.com/dev/test.git
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:496)
at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
at hudson.scm.SCM.poll(SCM.java:373)
at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1542)
at hudson.model.AbstractProject._poll(AbstractProject.java:1514)
at hudson.model.AbstractProject.poll(AbstractProject.java:1448)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468)
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: Failed to fetch from g...@ss.abc.com/dev/test.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:668)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:575)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:494)
... 13 more
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress g...@ss.abc.com/dev/test.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: fatal: 'g...@ss.abc.com/dev/test.git' does not appear to be a git repository
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:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Done. Took 0.3 sec
No changes


How do we overcome these errors so have a simple Git clone/fetch/co for our work ?

Any help is appreciated.
Thank you.

Mark Waite

unread,
Jul 9, 2015, 12:07:21 AM7/9/15
to jenkins...@googlegroups.com
Some things you could try to see if they help:

- Confirm that you have the correct URL for the repository and that you can clone from a command line
- Confirm that you can clone from inside a jenkins job using that command line
- Confirm that you've entered the credential correctly
- Confirm that you're using that credential

You might also consider separately installing a newer Jenkins version with git client plugin 1.17.1 and git plugin 2.3.5, in case those help.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2B7%2BkFDW1qGpdeh9jj6o2mD4GoE-obkw4MSn3e7AwqhL%3Dh8F2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Björn Pedersen

unread,
Jul 9, 2015, 3:30:05 AM7/9/15
to jenkins...@googlegroups.com

Repo URL: g...@ss.abc.com/dev/test.git

This seems wrong: I would expect
   ssh://git@ss.abc.com/dev/test.git

Björn

Mark Waite

unread,
Jul 9, 2015, 8:00:57 AM7/9/15
to jenkins...@googlegroups.com
I regularly test URL's of the form:

g...@github.com:MarkEWaite/git-client-plugin
g...@github.com:MarkEWaite/bin

I've never seen a URL user@host/path, rather they've more typically been user@host:path .

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages