我以爲自己git用的很六了,結果重裝了一次,我特麼配置都沒配置在那瞎雞兒搞。辣雞!
兩步
- 設置用戶名,密碼(這兩個就好了,其他的參看ProGit)
git config --global user.name "John Doe"
git config --global user.email [email protected]
- 添加公匙 (ProGit沒寫這一步。。。沒這一步git clone 會出現下面鏈接的問題)
git遇到的問題之“Please make sure you have the correct access rights and the repository exists.”
事情緣由:
windows環境,筆記本重裝了系統,之前配置的git歷史也不在了。
想下載Apollo,
輸入
git clone [email protected]:ApolloAuto/apollo.git
提示
Cloning into 'apollo'...
[email protected]: 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這塊也沒看懂。所以也是耽誤了這麼多天。
稍微動動腦子吧少年。