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

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


Use bundle config github.https true


Git provides URL rewriting functionality using the url..insteadOf configuration option.

So to make all connections to github.com use https:// rather than git://

git config --global url."https://github.com".insteadOf git://github.com

The --global switch sets the config option for all git operations by the current user, so there are times where it may be too intrusive. But it does avoid changing the git config in the current project.


You can do:

gem 'jasmine', git: 'https://github.com/pivotal/jasmine-gem.git'