Gemfiles and GitHub Enterprise

It took me about 30 minutes to figure out how to point a Gemfile to a GitHub Enterprise repository, in a GitHub organization, in a branch. Here’s the solution I whipped-up:

gem 'mygem', :git => "http://username:password@ourgithub.ourdomain.com/organization/mygem.git", :branch => "bugfix/mybranch"

However, do not check this in to your repo. Your username/password is in plain text.

If anyone has a better suggestion, please post it in the comments. Thanks.

Advertisements

2 thoughts on “Gemfiles and GitHub Enterprise

  1. Rob

    I was able to set it up such that no authentication was needed by using the read only target with a line like this:

    gem ‘your-gem-name’, :git => “git://github.your-domain.com/username/gem-containing-repo.git”

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s