我以为自己git用的很六了,结果重装了一次,我特么配置都没配置在那瞎鸡儿搞。辣鸡!
两步
- 设置用户名,密码(这两个就好了,其他的参看ProGit)
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
- 添加公匙 (ProGit没写这一步。。。没这一步git clone 会出现下面链接的问题)
git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”
事情缘由:
windows环境,笔记本重装了系统,之前配置的git历史也不在了。
想下载Apollo,
输入
git clone git@github.com:ApolloAuto/apollo.git
提示
Cloning into 'apollo'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
因为两周前我在Linux下clone Apollo时,也遇到了很多问题,所以我以为也可能是Apollo文件太大的问题。
这也就导致了我不能定位是哪个问题。在这种情况下,极不情愿地搜了一下,我真的是懒,怕麻烦,这个心态要害死我。
于是先是发现自己连用户名都没有配置,然后发现也忘记了还要配置ssh密匙,之前看ProGit这块也没看懂。所以也是耽误了这么多天。
稍微动动脑子吧少年。