场景:
A B两个gitlab地址,A地址配置了id_rsa.pub 可以拉代码,github配置了也没问题,但是在B的gitlab中配置id_rsa.pub使用ssh克隆代码就会出现
Permission denied的错误,
Permission denied, please try again.
git@127.0.0.1's password:
git@127.0.0.1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
参考链接:
https://blog.51cto.com/u_14201949/5996117
在自己的.ssh 目录下创建config文件使支持多gitlab克隆代码
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa