Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force bundle install to use https:// instead of git:// for GitHub-based gems

I am trying to build a rails project and because the host I am working on doesn't have access to the Internet for the the git:// protocol (port 9418) I get errors like

Fetching git://github.com/pivotal/jasmine.git fatal: unable to connect to github.com: github.com[0: 192.30.252.130]: errno=Connection refused 

when running bundle install.

The relevant line in the GemFile doesn't specify git:// as a protocol, it just points to GitHub as the source for the gem

gem 'jasmine', :github => 'pivotal/jasmine-gem' 

What do I have to do to make bundler to use https:// rather than git:// for pulling gems from GitHub?

Edit:

Is there a way other than editing every affected line in the GemFile? I'd prefer to avoid any merging issues down the line if the project's GemFile is updated.

like image 672
Bell Avatar asked Jan 21 '14 14:01

Bell


1 Answers

Use bundle config github.https true

like image 161
Sam Kah Chiin Avatar answered Sep 17 '22 14:09

Sam Kah Chiin