在本地生成了新的ssh公钥
命令:
ssh-keygen -t rsa -f ~/.ssh/id_rsa -C "shoufeng"
生成以后将id_rsa.pub配置到代码仓库,拉取代码,提示错误:
Administrator@XTZJ-20220220UO MINGW64 /d/06_git
$ git clone git@code.aliyun.com:41674-redcreation/xh-live-training.git
Cloning into 'xh-live-training'...
Unable to negotiate with 47.98.49.44 port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因ssl升级,导致系统要增加配置项。~/.ssh/config
文件(没有的话创建一个,注意没有扩展名)增加如下三行配置:
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
Over。
网友评论