gem文件与git远程失败heroku推 [英] Gem file with git remote failing on heroku push

查看:132
本文介绍了gem文件与git远程失败heroku推的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的gemfile中有以下行:

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

它指向的回购是公开的,我可以运行捆绑安装/更新本地就好了。当我尝试推送到Heroku时,出现以下错误:


 正在获取git@github.com :Dakuan / client_side_validations.git 
主机密钥验证失败。
致命:远程端意外挂起
Git错误:命令`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`目录/ tmp / build_1xa9f06n4k1cu失败。


!无法通过Bundler安装宝石。

! Heroku推送被拒绝,未能编译Ruby / rails应用程序

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

解决方案

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


$ b

git@github.com:... URL是可写的SSH版本,需要使用SSH进行验证键连接到可以对存储库进行写入访问的GitHub帐户。


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



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

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

请参阅 Bundler Git文档以获取更多信息。


I have the following line in my gemfile:

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

The repo it's pointing at is public and I can run bundle install / update locally just fine. When I try to push to Heroku I get the following error:

   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.

! ! Failed to install gems via Bundler. ! ! Heroku push rejected, failed to compile Ruby/rails app

Anyone got any ideas about what's going on here?

解决方案

Use this GitHub URL instead: git://github.com/Dakuan/client_side_validations.git

The git@github.com:… URL is the writable SSH version, which requires authentication with an SSH key connected to a GitHub account that has write access to the repository.

The git://github.com/… URL is the public, read-only version.

Since the gem you're using is in a public GitHub repository, you can also use this shorthand in your Gemfile:

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

See the Bundler Git documentation for more information.

这篇关于gem文件与git远程失败heroku推的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆