SSH git code error caused by: org. Eclipse. Jgit. Errors. Transportexception: git@gitlab invalid privatekey
When using SSH git code, we found the problem of invalid private key:
the following shows some inline code chips
.
Caused by: org.eclipse.jgit.errors.TransportException: [email protected]:xxx.git: invalid privatekey: [B@2fc74d70
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:158)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:107)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.(TransportGitSsh.java:247)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:137)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:105)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:91)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1260)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:211)
... 60 common frames omitted
Caused by: com.jcraft.jsch.JSchException: invalid privatekey: [B@2fc74d70
at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:406)
at com.dmall.autotestcenter.service.impl.GitServiceImpl$1.createDefaultJSch(GitServiceImpl.java:81)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:350)
at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:308)
at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:175)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:105)
... 67 common frames omitted
The reason is that the openssh version is used to generate the key, which leads to too high version:
solution:
SSH keygen – M PEM – t RSA regenerates the key in the old format, which can change the key format specified by the
– M parameter, and PEM (that is, RSA format) is the old format used before
Read More:
- Gitlab service migration and gitlab administrator password retrieval
- Solution of gitlab 502 problem I encountered
- Git error prompt: fatal: not a git repository (or any of the parent directories):. Git
- Support annot run git xcrun: error: invalid active developer path
- windows GitLab: PTY allocation request failed on channel 0
- GitLab You are not allowed to push code to this project
- How to turn off merge request in gitlab
- [Solved] Mac git clone error:xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools)
- [Git] git pull pull remote git push to remote git commit submit reject
- Win10 installation git click git bash flash back problem solution
- Git bash run error, GIT 32 bit
- Git prompts another git process sees to be running in this repository, e.g. an editor opened by
- Solve the problem of warning in sourcetree: templates not found / usr / local / git / share / git core / templates
- How to solve error: failed to push some refs to ‘[email protected]:……git pull conflict
- Error: No such keg: /usr/local/Cellar/node&install nvm&brew installation&Oh my zsh.git installation&git set alias&No bundle URL prese
- Error: no such keg: / usr / local / cellular / node & install NVM & Brew install & oh my Zsh. Git install & git set alias & no bundle URL press
- Clear the user name and password stored in GIT
- Git report HTTP Basic: Access denied
- Reset local git account and generate secret key