我们有一个在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