由于gem bundler,应用程序无法推送到heroku(无法将主机添加到已知主机列表(/home/group_home/.ssh/known_hosts))

时间:2011-08-29 02:28:00

标签: ruby-on-rails heroku bundler spree gemfile

我在尝试推送狂欢沙箱车来测试我将要使用的扩展时遇到此错误。

我的Gemfile

gem 'spree_flexi_variants', :git=>'git@github.com:jsqu99/spree_flexi_variants.git', :branch => 'pre-deface-stable'

heroku推送的输出:


julio@ubuntu:~/rails/sandboxcart $ git push heroku master
Counting objects: 502, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (475/475), done.
Writing objects: 100% (502/502), 2.63 MiB | 458 KiB/s, done.
Total 502 (delta 44), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Fetching source index for http://rubygems.org/
       Fetching git@github.com:jsqu99/spree_flexi_variants.git
       Failed to add the host to the list of known hosts (/home/group_home/.ssh/known_hosts).
       Permission denied (publickey).
       fatal: The remote end hung up unexpectedly
       An error has occurred in git when running `git clone "git@github.com:jsqu99/spree_flexi_variants.git" "/disk1/tmp/build_1s7xejrz2f9xk/.bundle/gems/ruby/1.9.1/cache/bundler/git/spree_flexi_variants-fc5500c20fdd64421924c0c5673538c7c6822540" --bare --no-hardlinks`. Cannot complete bundling.
       FAILED: http://devcenter.heroku.com/articles/bundler
 !     Heroku push rejected, failed to install gems via Bundler

应用程序运行并正确使用gem,但在尝试部署时会发生该错误。我仍处于解决问题的过程中,但任何帮助都会受到赞赏。

2 个答案:

答案 0 :(得分:9)

进行以下更改:

gem 'spree_flexi_variants', :git=>'git@github.com:jsqu99/spree_flexi_variants.git', :branch => 'pre-deface-stable'

gem 'spree_flexi_variants', :git=>"git://github.com/jsqu99/spree_flexi_variants.git", :branch => 'pre-deface-stable'

应该这样做,它与你的heroku密钥无关。

答案 1 :(得分:0)

这看起来像是SSH密钥的问题。

Heroku Site有关于如何管理SSH密钥的说明。

尝试heroku keys并确保您已正确配置。