Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`bundle install` fails (because of git protocol)

With this simple Gemfile,

source 'https://rubygems.org'
gem 'activerecord', "~> 2.2.3"
gem 'activerecord-sqlserver-adapter', github: 'arthrex/activerecord-sqlserver-adapter', :branch => '2-3-stable'

bundle install fails with

Fetching git://github.com/arthrex/activerecord-sqlserver-adapter.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=No error

Git error: command `git clone
"git://github.com/arthrex/activerecord-sqlserver-adapter.git"
"c:/Languages/Ruby/1.9.3/lib/ruby/gems/1.9.1/cache/bundler/git/activerecord-sqlserver-adapter-8019982c6a12a1297e8a135275
d94bdee6cd893b"
--bare --no-hardlinks` in directory c:/Users/BZISAD0/Code/CSV has failed.

At first I thought my proxy configurations were screwed up but I can execute this command with no problem:

$ git clone http://github.com/arthrex/activerecord-sqlserver-adapter.git

With the git protocol, however, it fails:

$ git clone git://github.com/arthrex/activerecord-sqlserver-adapter.git
Cloning into 'activerecord-sqlserver-adapter'...
fatal: unable to connect to github.com:
github.com[0: 192.30.252.130]: errno=No error

so I'm inferring that the proxy is not playing nice with the git protocol. At any rate, for whatever reason, http is working fine but the git protocol is not.

Is there a way to work around this? E.g. configuring the use of http:// rather than git:// in my ~/.gitconfig?

like image 369
iconoclast Avatar asked Dec 12 '22 08:12

iconoclast


1 Answers

Don't use the github: short form in your Gemfile, just use the regular git: syntax

gem 'activerecord-sqlserver-adapter', git: 'http://github.com/arthrex/activerecord-sqlserver-adapter.git'
like image 51
cpjolicoeur Avatar answered Dec 26 '22 21:12

cpjolicoeur