Using Gemfury with Bundler is easy, just add a source
block with a Repo-URL
to your Gemfile
and enclose your private package requirements:
source 'https://gem.fury.io/USERNAME/' do
gem 'private-gem', '~> 1.0'
end
You can also configure the source for individual packages with:
gem 'private-gem', source: 'https://gem.fury.io/USERNAME/'
Authenticating for private gems
To access private gems, you will need to authenticate using a deploy token. You can do this with Bundler configuration or through an environment variable.
For local development, we recommend saving credentials to your Bundler config with:
bundle config gem.fury.io DEPLOY-TOKEN
For builds and deployment, you may configure authentication through the environment:
export BUNDLE_GEM__FURY__IO=DEPLOY-TOKEN