jgitflow Mac下报错 Auth Fail和Invalid privateKey解决

jgitflow Mac下报错 Auth  Fail和Invalid privateKey 根本原因是mac新版的ssh加密解密不再支持ssh-dss,转而使用openssh引起,具体解决如下:

Error finishing feature: Error finish feature: org.eclipse.jgit.api.errors.TransportException: git@xx.com:xx/aa.git: Auth fail -> [Help 1]

通过如下解决:

The problem has been solved. I found an issue in the jgit forum that actually had the solution: https://www.eclipse.org/forums/index.php/m/1689963/?srch=auth+fail#msg_1689963.
It turns out that changing the ~/.ssh/config file to this:

did the trick.

参考:

https://github.com/shillner/unleash-maven-plugin/issues/62

按此操作后,不再报Auth fail,但马上又会报另一个 invalid privatekey 错误:

Error starting release: org.eclipse.jgit.api.errors.TransportException:invalid privatekey:

此处原因:

本地ssh-keygen生成的id_rsa文件中不是以-----BEGIN RSA PRIVATE KEY-----开头,以----open ssh开头了,不识别,此时需要重新生成ssh key即可,如下:

ssh-keygen -m PEM -t rsa -b 4096

参考:https://www.eclipse.org/forums/index.php/t/1095599/

https://github.com/net-ssh/net-ssh/issues/633
https://blog.csdn.net/lsp84ch80/article/details/87861990

相关推荐