github - 关于 GIT 怎么设置多个不同的部署公钥?

浏览:34日期:2023-09-10

问题描述

/home/www/.ssh/id_rsa中有两个部署公钥

---begin---github--end-----begin--git.oschina.net---end--

使用 clone 从 github 上没问题,换到 其他公钥(平台)就不行了。提示错误如下:

RSA key fingerprint is 98:ab:2b:30:60:00:82:86:bb:85:db:87:22:c4:4f:b1.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ’101.70.156.64’ (RSA) to the list of known hosts.Permission denied (publickey).fatal: The remote end hung up unexpectedly

问题解答

回答1:

已解决在~/.ssh/config中新增规则就好了。

回答2:

http://blog.sina.com.cn/s/blo...修改config就行了

相关文章: