问题描述:
远程访问git仓库时使用ssh方式时,经常提示
Enter passphrase for key '/Users/XXX/.ssh/id_rsa':
但又经常忘记密码,导致
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
解决方案--->重新设置ssh:
重新生成rsa文件
ssh-keygen -t rsa -b 4096 -C"xxxxx@qq.com"
按提示输入密码,切记一定要记住密码,在远程新建仓库拉取等操作需要用到此密码!!
找到.ssh 目录下的id_rsa.pub公钥文件 将其中内容复制到自己账户里的git中的ssh公钥条目里