简体   繁体   English

JGIT:致命:无法初始化类 org.eclipse.jgit.transport.Transport

[英]JGIT: FATAL: Could not initialize class org.eclipse.jgit.transport.Transport

When I use Jenkins to build my project, I got error:当我使用 Jenkins 构建我的项目时,出现错误:

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:当我提供 git 存储库时,我也会收到错误消息:

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.请帮帮我,明天是我的截止日期。 :( :(

Try and restart your Jenkins, hope that will help.尝试重新启动您的 Jenkins,希望能有所帮助。

systemctl restart jenkins systemctl 重启詹金斯

service jenkins restart服务詹金斯重启

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 SSH 到 Jenkins 服务器并测试您是否可以手动克隆存储库
  • If ok, test it with the Jenkins credentials如果没问题,请使用 Jenkins 凭据进行测试
  • On the configuration screen of your Jenkins build, do you see an error message?在 Jenkins 构建的配置屏幕上,您是否看到错误消息? Jenkins will try to connect to your repository on the config screen and let you know if that doesn't work. Jenkins 将尝试在配置屏幕上连接到您的存储库,并让您知道如果这不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JGit:传输异常-拒绝HostKey:bitbucket.org - JGit: Transport Exception - reject HostKey: bitbucket.org Maven Jgit JDWP传输错误 - Maven jgit JDWP transport error 传输错误:: Jgit:: git-upload-pack 不允许 - Transport Error :: Jgit :: git-upload-pack not permitted Eclipse Thym 需要 'osgi.bundle; org.eclipse.jgit [3.0.0,5.0.0)' 但找不到 - Eclipse Thym requires 'osgi.bundle; org.eclipse.jgit [3.0.0,5.0.0)' but it could not be found 在JGit上获取异常“ org.eclipse.jgit.api.errors.InvalidConfigurationException:远程密钥没有值” - Getting exception “org.eclipse.jgit.api.errors.InvalidConfigurationException: No value for key remote” at JGit org.eclipse.jgit.errors.LockFailedException 使用 Hawtio 时 - org.eclipse.jgit.errors.LockFailedException when using Hawtio 如何修复 Eclipse 中 jgit 类的 java.lang.ClassNotFoundException - How to fix java.lang.ClassNotFoundException of jgit's class in Eclipse 带有 JGit 实现的 Eclipse 插件项目 - Eclipse Plugin Project with JGit implementation Maven Eclipse 调试“JDWP Transport dt_socket 初始化失败,TRANSPORT_INIT(510)” - Maven Eclipse Debug "JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)" 无法初始化 class org.testng.eclipse.util.ClassMethodsSuite - Could not initialize class org.testng.eclipse.util.ClassMethodsSuite
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM