1
將公鑰bitbucket
ACCT,ssh -T [email protected]
返回(在Windows中)後:Capistrano的部署與到位桶 - 權限被拒絕(公鑰)
The authenticity of host 'bitbucket.org (131.103.20.167)' can't be established.
RSA key fingerprint is 65:8c:1b:f2:6f:91:6b:5c:3b:ec:4a:46:46:74:7z:40.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org' (RSA) to the list of known hosts.
logged in as myusername.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
我們證實bitbucket.org
已添加到known_hosts
。該cap deploy
命令返回:
Host key verification failed.
fatal: The remote end hung up unexpectedly
添加了下面的2行deploy.rb
文件:
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
現在cap deploy
返回錯誤:
Permission denied (publickey).
鍵不被口令保護。如果密鑰被bitbucket
(ssh -T
返回正確的信息)接受,爲什麼我們仍然有Permission denied
的錯誤。
'@Alister Bulman','ssh -T git @ bitbucket.org'在遠程服務器上返回'權限被拒絕',你說得對。我們是否需要在遠程服務器上添加密鑰並將其私鑰添加到bitbucket? – user938363
也謝謝你! – user938363
您只需要確認主機的真實性 - 它可能會失敗,因爲您沒有在簡單的SSH登錄中轉發密鑰,但是它應該會更好地與Capistrano和轉發的代理進行通信。 –