-2

When I use Jenkins to build my project, I got error:

Could not initialize class org.eclipse.jgit.transport.Transport
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.Transport
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:120)
    at org.jenkinsci.plugins.gitclient.JGitAPIImpl$2.execute(JGitAPIImpl.java:631)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:761)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
    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:408)

And I also get the error when I give git repository:

Failed to connect to repository : Command "/usr/bin/git -c core.askpass=true ls-remote -h ssh://ha.nguyen@192.168.10.13/CVS/git/Brea HEAD" returned status code 128:
    stdout: 
    stderr: Permission denied, please try again. 
    Permission denied, please try again. 
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). 
    fatal: The remote end hung up unexpectedly

Please help me, tomorrow is my deadline. :(

Semih Eker
  • 2,389
  • 1
  • 20
  • 29
Einsamer
  • 1,069
  • 4
  • 17
  • 34
  • That guy seems to have a similar problem: https://www.eclipse.org/forums/index.php/t/612722/ – Friwi Oct 15 '15 at 12:25

2 Answers2

1

Try and restart your Jenkins, hope that will help.

systemctl restart jenkins

service jenkins restart

Elly Nikon
  • 11
  • 1
0

The second error message seems to inidicate something wrong with the credentials.

You can try the following:

  • SSH to the Jenkins server and test if you can manually clone the repository
  • If ok, test it with the Jenkins credentials
  • On the configuration screen of your Jenkins build, do you see an error message? Jenkins will try to connect to your repository on the config screen and let you know if that doesn't work.
Peter
  • 870
  • 6
  • 20
  • Could you please tell me more details. :) – Einsamer Oct 15 '15 at 15:01
  • First thing first, can you connect or otherwise log in to your Jenkins server? Can you try to clone the repository manually on the Jenkins machine? TBH if you don't know how to perform these actions, I would strongly suggest you to go with a cloud host like Cloudbees. They have a great service and everything "just works" – Peter Oct 15 '15 at 18:32
  • Thank you, I can use same account to connect to git server but cannot do it with jenkins. Anyway, I found out the solution. It's the jenkins new version error. When I resintall old version (1.624), it works well. :D – Einsamer Oct 16 '15 at 08:56