问题
运行 git clone git@code.aliyun.com:project-main/project-name.git
,报错如下:
Cloning into 'project-name'...
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.
解决
- 找到你本地的ssh目录(例如:C:\Users\admin.ssh)
- 新增文件:config:
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
tip:安全起见,
*
最好写为具体ip或域名
over