Skip to content

Instantly share code, notes, and snippets.

@ream88
Created August 21, 2015 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ream88/bd5cfc2429dc14287bc5 to your computer and use it in GitHub Desktop.
Save ream88/bd5cfc2429dc14287bc5 to your computer and use it in GitHub Desktop.
Never include GitHub access tokens in your Gemfile again
# Be sure to have GITHUB_TOKEN set to your access token... via `export` or via .rbenv-vars for example.
source 'https://rubygems.org'
git_source(:private_github) { |repo_name| "https://#{ENV.fetch('GITHUB_TOKEN')}:x-oauth-basic@github.com/#{repo_name}.git" }
gem 'my-super-secret-gem', private_github: 'haihappen/my-super-secret-gem'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment