我們有一個在Amazon AWS上運行的Rails應用程序。我們幾乎每天都會推出一個新代碼,連續幾個月。Capistrano無法部署代碼,因爲Net :: SSH :: AuthenticationFailed:身份驗證失敗
今天,當我試圖在那裏部署新的代碼,我得到了這樣的錯誤消息:
* 2014-02-16 13:09:51 executing `deploy'
* 2014-02-16 13:09:51 executing `deploy:update'
** transaction: start
* 2014-02-16 13:09:51 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote [email protected]:my_bitbucket_name/project_name.git master"
command finished in 2909ms
* executing "if [ -d /home/deployer/project_name/shared/cached-copy ]; then cd /home/deployer/project_name/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 16958dfcee27dd9c33855ecece0013428e2c57c8 && git clean -q -d -x -f; else git clone -q -b master [email protected]:rdudacz/looky.co.git /home/deployer/looky/shared/cached-copy && cd /home/deployer/project_name/shared/cached-copy && git checkout -q -b deploy 16958dfcee27dd9c33855ecece0013428e2c57c8; fi"
servers: ["IP"]
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deployer/project_name/releases/20140216120957; true"
servers: ["IP"]
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: IP (Net::SSH::AuthenticationFailed: Authentication failed for user [email protected])
connection failed for: IP (Net::SSH::AuthenticationFailed: Authentication failed for user [email protected])
這裏發生了什麼?從哪裏開始尋找問題?
我'使用net-SSH 2.7。 0'和無密碼登錄工作正常,但仍然得到'Net :: SSH :: AuthenticationFailed' –
謝謝你!看起來2.9也有一個問題,它無法通過端口22連接到服務器,而使用SSH工作正常。恢復到2.7作品! –
我使用ruby-2.1.2p95,安裝net-ssh 2.7.0之後,我得到這個錯誤:**/ruby-2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb:298:在'to_specs'中:找不到'net-ssh'(> = 2.8.0) - 找到了:[net-ssh-2.7.0](Gem :: LoadError) – aqingsao