參考文章:Windows下Git多賬號(hào)配置敷燎,同一電腦多個(gè)ssh-key的管理
按流程執(zhí)行后,碰到的問題
Permission denied, please try again.
需要執(zhí)行ssh-add ,執(zhí)行后出現(xiàn)如下問題:
Could not open a connection to your authentication agent.
排查后,先執(zhí)行ssh-agent bash络拌,再執(zhí)行ssh-add
[root@localhost wakavS]# ssh-add ~/.ssh/id_rsa_Leen
Could not open a connection to your authentication agent.
[root@localhost wakavS]# ssh-agent bash
[root@localhost wakavS]# ssh-add ~/.ssh/id_rsa_Leen
Enter passphrase for /root/.ssh/id_rsa_Leen:
Identity added: /root/.ssh/id_rsa_lidong (/root/.ssh/id_rsa_Leen)
操作成功。
原文鏈接:https://blog.csdn.net/leedaning/java/article/details/49888335