昨天入职第一天Git拉代码还好好的,今天一来就报错。。。
期间捣鼓了很多东西,不知道怎么引起的
参考网上博客:
1. Gerrit上SSH Key重新加过了,确认没问题;
2.ssh-agent bash;ssh-add "你的 id-rsa 文件地址" ,FAILED;
3.找老板确认Gerrit上权限没问题;
4.还有改.ssh/下Host文件的,FAILED
。。。。
ddd@192.168.1.1: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方案:
之前使用 ssh-keygen -t rsa -C "youremail@example.com" 方式生成密钥,后续改成在BASH中输入 ssh-keygen.exe,生成 id_edxxxxx.pub格式的密钥,然后贴到Gerrit上,解决!666