我正在關注this指南,在我的Mac El Captain上設置ruby on rails環境。ruby on rails git permission denied
我跟隨安裝自制軟件,紅寶石最新版本2.2.3與rbenv。現在,我正在設置git。
隨訪前幾個命令
git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
現在,我一直在詢問是否保存生成的密鑰。我將它保存到名爲file
的~
目錄中。我現在有兩個文件,即file
和file.pub
。我去了this鏈接複製ssh密鑰。我點擊在那裏添加SSH密鑰選項。將密鑰命名爲ROR SSH密鑰。
在file.pub
的關鍵看起來像
SSH-RSS asfjasfhjalsfdhaskfdhalsdfsdf \ ASDF \作爲\ DG \ SA \ fasdfas \˚F\ ASDF ---等隨機數字--- adfasdfasfa [email protected]
我在github上粘貼了密鑰並保存了密鑰。
然後,我回到終端並輸入下面的命令。
ssh -T [email protected]
,但我沒有收到任何消息,說「excid3嗨!你已經成功驗證,但GitHub上不提供shell訪問。」
我得到一個消息,說
The authenticity of host 'github.com (192.30.251.130)' can't be established.
RSA key fingerprint is SHA256:nThbg6sdfgdfgsdfgGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.251.130' (RSA) to the list of known hosts.
Permission denied (publickey).
上面我在SHA256鍵中改變了幾個字符。只是爲了安全。另外,我也改變了IP地址。但是,它背後的想法是一樣的。
請指導我什麼是錯的。謝謝。
嘗試在終端上鍵入'ssh-add'並再次推送 – matanco
@matanco您能否重新編寫我需要在終端中編寫的完整命令? – AbhimanyuAryan
這是命令:'ssh-add'然後再試一次你做了什麼。 – matanco