Using bundler to install a gem from github, there are two obvious choices; https:// or git://.
From the default rails template;
gem "rails", :git => "git://github.com/rails/rails"
But, when viewing the rails repo on github, the default clone url is the https:// url.
Copying and pasting straight from github, I’d end up with;
gem "rails", :git => "https://github.com/rails/rails.git"
These two lines are almost the same, but not quite.
Is there any benefit to git:// over https://?
Is one of them faster to do a bundle install?
Is doing an https:// checkout easier to cache from githubs perspective?
They will be pretty much the same. If you are behind a firewall etc. you might consider the
httpsone.gitprotocol might be slightly faster ( and is read-only), but it is negligible.If you don’t care about firewall, use git protocol for bundler purposes as it is the right intent – read only clone of a repo.