2016-09-22 82 views
1

我已經通過下面的命令添加SSH密鑰到我的git倉庫,現在越來越以下錯誤:的Git回購訪問問題

CMD git config --global url.ssh://[email protected]/.insteadOf https://github.com/ 

Error : User1’s-MacBook-Pro:untitled folder ndpiparava$ git clone https://github.com/XXX-Asft/XXXX 
Cloning into 'XXXXX'... 
Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

我已經意識到,我已經通過建立SSH而不是HTTPS建立了錯誤。
有沒有什麼辦法可以從我的遠程git的ssh列表中刪除我的ip並開始使用https?

回答

1

git config --global url.ssh://[email protected]/.insteadOf https://github.com/

這意味着開始https://github.com/任何網址將與ssh://[email protected]/被改寫。

沒有「從我的遠程git的SSH列表的IP」刪除。

您可以簡單地delete that global config setting

git config --global --unset url.ssh://[email protected]/.insteadOf 

而你可以remove your public key you set on your GitHub account

+0

我不知道未設置的命令。謝謝 – Nit