2014-11-07 28 views
0

所以我得到了以下提示:權限在試圖運行</p> <pre><code>git push origin master </code></pre> <p>上混帳推拒絕錯誤

The authenticity of host 'github.com (192.30.252.129)' can't be established. 
RSA key fingerprint is ... 
Are you sure you want to continue connecting (yes/no)? 

對此我不小心說「不」。現在,我試圖推時收到以下錯誤信息:

Permission denied (publickey). 
fatal: Could not read from remote repository. 

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

如果有人可以幫助我手動想法子重新提示或做它,我不勝感激!

注:

ssh -vT [email protected]

回答

1

一種方法是刪除您~/.ssh/known_hosts文件:嘗試以下時,我甚至得到一個Permission denied (publickey).錯誤。這樣,ssh會再次要求你驗證url的真實性。

但是,您將被要求驗證任何其他已經工作的url的真實性。

編輯

運行以下從您的已知主機條目清理條目:

ssh-keygen -R github.com 

你似乎使用sudo已生成的密鑰,因此密鑰與鏈接root帳號。此外,在我看來,你正在嘗試使用另一個非root帳戶連接到github,所以ssh密鑰根本不匹配。我建議不用sudo生成ssh-keys,然後將相應的密鑰添加到你的github帳戶中。

+0

裏面沒有known_hosts文件.ss​​h/...我刪除了一個authorized_keys文件,但它沒有幫助 – Murgittroyd 2014-11-07 17:20:30

+1

@Murgittroyd你可以嘗試運行'ssh-keygen -R github.com',看看是否作品? – 2014-11-07 17:29:04

+0

#主機github.com發現:line 1 type RSA /root/.ssh/known_hosts updated。 原始內容保留爲/root/.ssh/known_hosts.old – Murgittroyd 2014-11-07 18:23:11

相關問題