【问题标题】:Capistrano: SSHKit::Command::Failed: bundle exit status: 1Capistrano:SSHKit::Command::Failed:捆绑退出状态:1
【发布时间】:2014-04-29 07:47:11
【问题描述】:

我正在使用 capistrano 3.2.1 和 Rails 4.1 应用程序。我正在尝试从我的 github 存储库安装 gem。但这是行不通的。我不知道是怎么回事。当我在我的服务器上运行ssh -T git@github.com 时,它就成功了。但是当我运行cap production deploy 时,会出现以下错误。

[aff68e9c] Finished in 9.435 seconds with exit status 0 (successful).
 INFO [45eeecaf] Running /usr/local/rvm/bin/rvm 2.0.0-p451@rails-4.1 do bundle install --binstubs /opt/www/moto/shared/bin --path /opt/www/moto/shared/bundle --without development test --deployment --quiet on 107.170.74.157
DEBUG [45eeecaf] Command: cd /opt/www/moto/releases/20140429073253 && /usr/local/rvm/bin/rvm 2.0.0-p451@rails-4.1 do bundle install --binstubs /opt/www/moto/shared/bin --path /opt/www/moto/shared/bundle --without development test --deployment --quiet
DEBUG [45eeecaf]    Warning, new version of rvm available '1.25.24', you are using older version '1.25.22'.
DEBUG [45eeecaf]    You can disable this warning with:    echo rvm_autoupdate_flag=0 >> ~/.rvmrc
DEBUG [45eeecaf]    You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
DEBUG [45eeecaf]    You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
DEBUG [45eeecaf]    Host key verification failed.
DEBUG [45eeecaf]    You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
DEBUG [45eeecaf]    fatal: Could not read from remote repository.
DEBUG [45eeecaf]    
DEBUG [45eeecaf]    Please make sure you have the correct access rights
DEBUG [45eeecaf]    and the repository exists.
DEBUG [45eeecaf]    Retrying git clone 'git@github.com:sdfsd/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet due to error (2/3): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git@github.ssdfsdf/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet` in directory /opt/www/moto/releases/20140429073253 has failed.
DEBUG [45eeecaf]    fatal: Could not read from remote repository.
DEBUG [45eeecaf]    
DEBUG [45eeecaf]    Please make sure you have the correct access rights
DEBUG [45eeecaf]    and the repository exists.
DEBUG [45eeecaf]    Retrying git clone 'git@github.sfafsd/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet due to error (2/3): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git@github.sdfsafa/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet` in directory /opt/www/moto/releases/20140429073253 has failed.
DEBUG [45eeecaf]    Host key verification failed.
DEBUG [45eeecaf]    Retrying git clone 'git@github.sfsafas/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet due to error (2/3): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git@github.sdfsafs/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet` in directory /opt/www/moto/releases/20140429073253 has failed.
DEBUG [45eeecaf]    fatal: Could not read from remote repository.
DEBUG [45eeecaf]    
DEBUG [45eeecaf]    Please make sure you have the correct access rights
DEBUG [45eeecaf]    and the repository exists.
DEBUG [45eeecaf]    Retrying git clone 'git@github.sdfsa/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet due to error (3/3): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git@github.sfsadfs/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet` in directory /opt/www/moto/releases/20140429073253 has failed.
DEBUG [45eeecaf]    fatal: Could not read from remote repository.
DEBUG [45eeecaf]    
DEBUG [45eeecaf]    Please make sure you have the correct access rights
DEBUG [45eeecaf]    and the repository exists.
DEBUG [45eeecaf]    Retrying git clone 'git@github.sdfsfsa/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet due to error (3/3): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git@github.sfdsaf/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet` in directory /opt/www/moto/releases/20140429073253 has failed.
DEBUG [45eeecaf]    Host key verification failed.
DEBUG [45eeecaf]    Retrying git clone 'git@github.dsffsd/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet due to error (3/3): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git@github.sdfsfs/mongoid_auto_increment.git' "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d" --bare --no-hardlinks --quiet` in directory /opt/www/moto/releases/20140429073253 has failed.
DEBUG [45eeecaf]    fatal: Could not read from remote repository.
DEBUG [45eeecaf]    
DEBUG [45eeecaf]    Please make sure you have the correct access rights
DEBUG [45eeecaf]    and the repository exists.
DEBUG [45eeecaf]    Git error: command `git clone
DEBUG [45eeecaf]    'git@github.sdfdsfs/mongoid_auto_increment.git'
DEBUG [45eeecaf]    "/opt/www/moto/shared/bundle/ruby/2.0.0/cache/bundler/git/mongoid_auto_increment-be1b78474ac71203d9549e08e5b3158473ff391d"
DEBUG [45eeecaf]    --bare --no-hardlinks --quiet` in directory
DEBUG [45eeecaf]    /opt/www/moto/releases/20140429073253 has failed.
DEBUG [45eeecaf]    fatal: Could not read from remote repository.
DEBUG [45eeecaf]    
DEBUG [45eeecaf]    Please make sure you have the correct access rights
DEBUG [45eeecaf]    and the repository exists.
cap aborted!
SSHKit::Command::Failed: bundle exit status: 11
bundle stdout: Nothing written
bundle stderr: Host key verification failed.
fatal: Could not read from remote repository.

有什么想法吗?如果您需要更多信息,请告诉我。

【问题讨论】:

  • 您将 ssh 密钥从服务器添加到 github repo deploy-keys?
  • @Monk_Code 是的。已添加。
  • 尝试从服务器克隆你的仓库。
  • 好的。等等……
  • 不,它是公开的。顺便说一句,谢谢你试图帮助我:D

标签: ruby-on-rails ruby ruby-on-rails-4 capistrano capistrano3


【解决方案1】:

改变

git@github.com:zolzaya/mongoid_auto_increment.git

到

git://github.com/zolzaya/mongoid_auto_increment.git

这应该可行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-22
    • 2010-12-22
    • 1970-01-01
    • 1970-01-01
    • 2018-11-04
    • 2021-10-29
    相关资源
    最近更新 更多