场景:
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
文章讲述了在GitLab环境中,尽管A地址的SSH密钥(id_rsa.pub)配置正常,但尝试从B地址克隆代码时遇到Permissiondenied错误。作者提供了创建.ssh/config文件以支持多GitLab克隆的解决方案,强调了设置正确访问权限的重要性。
180

被折叠的 条评论
为什么被折叠?



