Git on job build fails

1,069 views
Skip to first unread message

Peter Miklosko

unread,
Mar 19, 2013, 7:45:35 AM3/19/13
to jenkin...@googlegroups.com
After upgrade to latest Jenkins (1.506) and plugins update I run in a problem that previously working builds just fails to verify and fetch data from Git.
Bellow is error I get on one of the projects

Started by user anonymous
Building in workspace /Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace
Checkout:workspace / /Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace - hudson.remoting.LocalChannel@4f399671
Using strategy: Default
Fetching changes from 1 remote Git repository
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: g...@github.com:novoda/tesco.git: Auth fail
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:212)
	at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:793)
	at hudson.plugins.git.GitSCM.access$000(GitSCM.java:57)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:976)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
	at hudson.FilePath.act(FilePath.java:865)
	at hudson.FilePath.act(FilePath.java:838)
	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
	at hudson.model.Run.execute(Run.java:1567)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:237)
Caused by: org.eclipse.jgit.api.errors.TransportException: g...@github.com:novoda/tesco.git: Auth fail
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137)
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:208)
	... 17 more
Caused by: org.eclipse.jgit.errors.TransportException: g...@github.com:novoda/tesco.git: Auth fail
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
	at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1104)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
	... 18 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
	at com.jcraft.jsch.Session.connect(Session.java:461)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
	... 25 more
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:981)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
	at hudson.FilePath.act(FilePath.java:865)
	at hudson.FilePath.act(FilePath.java:838)
	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
	at hudson.model.Run.execute(Run.java:1567)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:237)

Jeff MAURY

unread,
Mar 19, 2013, 8:10:19 AM3/19/13
to jenkin...@googlegroups.com
I had the same problem and I just went back to the git plugin version 1.1.26
It seems to the that as the 1.3 is using JGit it is not using $HOME/.ssh files anymore.

Regards
Jeff



--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Kevin Fleming (BLOOMBERG/ 731 LEXIN)

unread,
Mar 19, 2013, 9:11:59 AM3/19/13
to jenkin...@googlegroups.com
Supposedly there is way to make the Git plugin (1.3.x or later) revert to using command-line git instead of JGit for repository access, but I can't seem to find any place to configure that.

----- Original Message -----
At: Mar 19 2013 08:11:40

I had the same problem and I just went back to the git plugin version 1.1.26
It seems to the that as the 1.3 is using JGit it is not using $HOME/.ssh
files anymore.

Regards
Jeff



On Tue, Mar 19, 2013 at 12:45 PM, Peter Miklosko <peter...@gmail.com>wrote:

> After upgrade to latest Jenkins (1.506) and plugins update I run in a
> problem that previously working builds just fails to verify and fetch data
> from Git.
> Bellow is error I get on one of the projects
>
> Started by user anonymous <http://localhost:8080/user/null>
> Building in workspace /Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace
> Checkout:workspace / /Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace - hudson.remoting.LocalChannel@4f399671
> Using strategy: Default
> Fetching changes from 1 remote Git repository
> ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anywayhudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>: org.eclipse.jgit.api.errors.TransportException: g...@github.com:novoda/tesco.git: Auth fail
> at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:212) <http://stacktrace.jenkins-ci.org/search/?query=org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch&entity=method>
> at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.GitSCM.determineRevisionToBuild&entity=method>
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1353) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractProject.checkout&entity=method>
> at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout&entity=method>
> at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) <http://stacktrace.jenkins-ci.org/search/?query=jenkins.scm.SCMCheckoutStrategy.checkout&entity=method>
> at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method>
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) <http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild.run&entity=method>
> at hudson.model.ResourceController.execute(ResourceController.java:88) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method>
> Caused by: org.eclipse.jgit.api.errors.TransportException <http://stacktrace.jenkins-ci.org/search?query=org.eclipse.jgit.api.errors.TransportException>: g...@github.com:novoda/tesco.git: Auth fail
> at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.api.FetchCommand.call&entity=method>
> at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:208) <http://stacktrace.jenkins-ci.org/search/?query=org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch&entity=method>
> ... 17 more
> Caused by: org.eclipse.jgit.errors.TransportException <http://stacktrace.jenkins-ci.org/search?query=org.eclipse.jgit.errors.TransportException>: g...@github.com:novoda/tesco.git: Auth fail
> at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.JschConfigSessionFactory.getSession&entity=method>
> at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.SshTransport.getSession&entity=method>
> at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.%3Cinit%3E&entity=method>
> at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.TransportGitSsh.openFetch&entity=method>
> at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.FetchProcess.executeImp&entity=method>
> at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.FetchProcess.execute&entity=method>
> at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1104) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.Transport.fetch&entity=method>
> at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.api.FetchCommand.call&entity=method>
> ... 18 more
> Caused by: com.jcraft.jsch.JSchException <http://stacktrace.jenkins-ci.org/search?query=com.jcraft.jsch.JSchException>: Auth fail
> at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116) <http://stacktrace.jenkins-ci.org/search/?query=org.eclipse.jgit.transport.JschConfigSessionFactory.getSession&entity=method>
> ... 25 more
> ERROR: Could not fetch from any repositoryFATAL <http://stacktrace.jenkins-ci.org/search?query=FATAL>: Could not fetch from any repositoryhudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>: Could not fetch from any repository
> at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.GitSCM.determineRevisionToBuild&entity=method>
> at hudson.model.AbstractProject.checkout(AbstractProject.java:1353) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractProject.checkout&entity=method>
> at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout&entity=method>
> at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) <http://stacktrace.jenkins-ci.org/search/?query=jenkins.scm.SCMCheckoutStrategy.checkout&entity=method>
> at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method>
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) <http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild.run&entity=method>
> at hudson.model.ResourceController.execute(ResourceController.java:88) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup


Jeff MAURY

unread,
Mar 19, 2013, 10:40:45 AM3/19/13
to jenkin...@googlegroups.com
There is a command line argument for that: see https://issues.jenkins-ci.org/browse/JENKINS-17204

Regards
Jeff

Peter Miklosko

unread,
Mar 19, 2013, 11:17:11 AM3/19/13
to jenkin...@googlegroups.com
If I use java -Dorg.jenkinsci.plugins.gitclient.Git.useCLI=true -jar jenkins-1.506.war

I get even worst error

Started by user anonymous
Building in workspace /Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace
Checkout:workspace / /Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace - hudson.remoting.LocalChannel@18b1625c
Using strategy: Default
selected Git installation does not exists. Using Default
ERROR: Workspace has a .git repository, but it appears to be corrupt.
hudson.plugins.git.GitException: Error performing command: /usr/local/git/bin rev-parse --is-inside-work-tree
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:780)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:739)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:749)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.hasGitRepo(CliGitAPIImpl.java:96)
	at hudson.plugins.git.GitAPI.hasGitRepo(GitAPI.java:186)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:964)
Caused by: java.io.IOException: Cannot run program "/usr/local/git/bin" (in directory "/Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace"): error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
	at hudson.Launcher$ProcStarter.start(Launcher.java:353)
	at hudson.Launcher$ProcStarter.join(Launcher.java:360)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:769)
	... 18 more
Caused by: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
	at java.lang.ProcessImpl.start(ProcessImpl.java:91)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
	... 24 more
Cloning the remote Git repository
Cloning repository g...@github.com:novoda/tesco.git
Error trying to determine the git version: Error performing command: /usr/local/git/bin --version
Assuming 1.6
ERROR: Error cloning remote repo 'origin' : Could not clone g...@github.com:novoda/tesco.git
hudson.plugins.git.GitException: Could not clone g...@github.com:novoda/tesco.git
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:219)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1001)
Caused by: hudson.plugins.git.GitException: Error performing command: /usr/local/git/bin clone -o origin g...@github.com:novoda/tesco.git /Users/Peter/.jenkins/jobs/Kwik-E-Mart/workspace
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:780)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:217)
	... 14 more
Caused by: java.io.IOException: Cannot run program "/usr/local/git/bin": error=13, Permission denied
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
	at hudson.Launcher$ProcStarter.start(Launcher.java:353)
	at hudson.Launcher$ProcStarter.join(Launcher.java:360)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:769)
	... 15 more
Caused by: java.io.IOException: error=13, Permission denied
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
	at java.lang.ProcessImpl.start(ProcessImpl.java:91)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
	... 21 more
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1013)

Jeff MAURY

unread,
Mar 19, 2013, 11:35:55 AM3/19/13
to jenkin...@googlegroups.com
Turns out that your configuration is wrong: Jenkins cannot run the git executable (in /usr/local/bin/git).
Maybe is it installed in another location.

Jeff



--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Peter Miklosko

unread,
Mar 20, 2013, 7:22:17 AM3/20/13
to jenkin...@googlegroups.com
OK sorted!

Yesterday I was doing everything possible from using git installation directory as in previous email, did Mac update to latest Mountain Lion and reinstalled git. Still it didn't worked.

Turms out to be problem with Git Client Plugin, originally attributed to Git Plugin as you linked previously Jeff. Debate since yesterday developed further and someone discovered that client plugin has to be downgraded to 1.0.3 (for anyone if you can't just uninstall and get copy of 1.0.3 here http://updates.jenkins-ci.org/download/plugins/git-client/)

Thanx for pointer Jeff

Regards

Peter
Reply all
Reply to author
Forward
0 new messages