Windows10 下 github ssh 訪問出現 Permission denied(publickey)錯誤的解決方法。
-
錯誤信息:
git clone git@github.com:ediwang/envsetup.git Cloning into 'envsetup'... 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.
-
解決方法:
-
打開 services.msc , 找到 OpenSSH Authentication Agent 服 務,然后啟用它。
-
進入 .ssh 目錄
-
執行 ssh-agent -s
-
執行 ssh-add id_rsa (id_rsa 要換成自己的)
-
執行
ssh -T git@github.com
,如果出現:
Hi molisiye! You've successfully authenticated, but GitHub does not provide shell access.
就說明可以通過 ssh 訪問 github 了
-