美文网首页git studyGit使用Git
多git ssh配置Permission denied问题

多git ssh配置Permission denied问题

作者: 康熙微博私访记 | 来源:发表于2016-06-17 11:00 被阅读94次

例如我们要配置自己工作环境的git ssh,git osc的ssh,github的ssh,但是默认情况下,ssh_config只识别~/.ssh/id_rsa对于的public key,为了能够兼容更多的配置,我们要进行如下设置。

问题现象

git ssh Permission denied (publickey)

修改配置文件 /etc/ssh/ssh_config

IdentityFile ~/.ssh/gitosc_rsa
IdentityFile ~/.ssh/id_rsa

相关文章

网友评论

  • d8b85388cc04:您好,我想问一下您用的是windows开发吗?这个 /etc/ssh/ssh_config目录和文件是不是自己建的啊?我弄了快一天也没解决这个问题。publickey也加了。
    康熙微博私访记:@永远的明天 我用的是mac

本文标题:多git ssh配置Permission denied问题

本文链接:https://www.haomeiwen.com/subject/srkvdttx.html