首页 > 其他 > 详细

解决使用Git遇到的:Enter passphrase for key '/Users/zhangxiaoxue/.ssh/id_rsa'问题

时间:2021-05-03 18:32:26      阅读:383      评论:0      收藏:0      [点我收藏+]

创建SSH Key

ssh-keygen -t rsa -C "youremail@example.com"

在生成SSH Key时,如果不小心设置了passphrase,使用SSH协议克隆远程仓库时,在每次git pull和git push时都会提示Enter passphrase for key ‘/Users/zhangxiaoxue/.ssh/id_rsa‘,每次都要手动输入密码才能继续操作,可以在命令行输入sh-keygen -p进行重新设置,直接回车输入为空,就没有密码了。

zhangxiaoxue@MacBook-Pro learn-git % ssh-keygen -p
Enter file in which the key is (/Users/zhangxiaoxue/.ssh/id_rsa): 
Enter old passphrase: 
Key has comment ‘sybil3904@163.com‘
Enter new passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved with the new passphrase.

解决使用Git遇到的:Enter passphrase for key '/Users/zhangxiaoxue/.ssh/id_rsa'问题

原文:https://www.cnblogs.com/Lotus3904/p/14727790.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!