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

/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)? yes
Warning: Permanently added '101.70.156.64' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
阅读 4.1k
2 个回答

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进