Mac笔记本eclipse使用git pull操作时报错
环境
Mac:13.0.1
eclipse:2022-06 (4.24)
git:2.38.1
现象
在eclipse的工程中,点击右键,使用git pull操作,会提示:
` Failed (ConnectException) to execute: Connection refused`
意思是git服务器无法连接
排查
1.首先排查网络原因,使用shell,同一个目录,执行git pull 操作,成功
2.排查eclipse问题,在eclipse中,使用git的其他操作正常
3.排查eclipse网络配置
切换provider,依然报错
在这里增加ssh的秘钥,恢复正常
原因分析
更新系统后,mac自带openssh升级到9.0版本(ssh -V确认),rsa加密废弃,不再提供认证。
ssh-keygen -t ed25519
有些同学可能多个系统共用一套密钥,切换比较麻烦,这种情况请在.ssh/config文件加上以下内容启用rsa。
Host *
PubkeyAcceptedKeyTypes +ssh-rsa
我的操作系统已经调整,但eclipse并没有随之更新,因此会报错。
参考:https://confluence.atlassian.com/bitbucketserverkb/ssh-rsa-key-rejected-with-message-no-mutual-signature-algorithm-1026057701.html