繁体   English   中英

geit文件与git远程在heroku推送失败

[英]Gem file with git remote failing on heroku push

我的gemfile中有以下行:

gem 'client_side_validations', :git => "git@github.com:Dakuan/client_side_validations.git", :branch => "master", ref: '2245b4174ffd4b400d999cb5a2b6dccc0289eb67'

它指向的repo是公共的,我可以在本地运行bundle install / update就好了。 当我尝试推送到Heroku时,我收到以下错误:

  Fetching git@github.com:Dakuan/client_side_validations.git Host key verification failed. fatal: The remote end hung up unexpectedly Git error: command `git clone 'git@github.com:Dakuan/client_side_validations.git' "/tmp/build_1xa9f06n4k1cu/vendor/bundle/ruby/1.9.1/cache/bundler/git/client_side_validations-56a04875baabb67b5f8c192c6c6743df476fd90f" --bare --no-hardlinks` in directory /tmp/build_1xa9f06n4k1cu has failed. 

无法通过Bundler安装gem。 Heroku推送拒绝,无法编译Ruby / rails应用程序

有人对这里发生的事情有任何想法吗?

请改用此GitHub网址: git://github.com/Dakuan/client_side_validations.git

git@github.com:… URL是可写SSH版本,需要使用连接到对存储库具有写访问权限的GitHub帐户的SSH密钥进行身份验证。

git://github.com/… URL是公共的只读版本。

由于您正在使用的gem位于公共GitHub存储库中,因此您也可以在Gemfile中使用此简写:

gem 'client_side_validations', :github => 'Dakuan/client_side_validations'

有关更多信息,请参阅Bundler Git文档

迟到的第二个答案,因为我遇到了Heroku的构建日志中的一些令人困惑的输出,这让我感到困惑了一段时间。

如果您的Gemfile中有多个Github托管的Gem,并且其中一个不可访问(在我的情况下,我不小心指向我的私有Repository not found ),构建日志会抛出错误,例如Username not foundRepository not found 所有的 Repository not found Github托管了宝石 - 即使是那些可用的宝石。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM