簡體   English   中英

git push權限被拒絕錯誤

[英]Permission denied error on git push

所以在嘗試跑步

git push origin master

我得到以下提示:

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.

如果有人可以幫助我找到重新提示或手動完成的方法,我將不勝感激!

注意:我什至收到一個Permission denied (publickey).Permission denied (publickey). 嘗試以下操作時出錯:

ssh -vT git@github.com

一種方法是刪除~/.ssh/known_hosts文件。 這樣,ssh會再次要求您驗證url的真實性。

但是,系統還會要求您驗證其他所有已在工作的URL的真實性。

編輯

運行以下命令從已知主機條目中清除條目:

ssh-keygen -R github.com

您似乎已經使用sudo生成了密鑰,因此這些密鑰與root帳戶關聯。 此外,在我看來,您正在嘗試使用另一個非root帳戶連接到github,因此ssh密鑰根本不匹配。 我建議不使用sudo生成ssh-keys,然后將相應的密鑰添加到您的github帳戶中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM