title: Store credentials for gems server
body: <p>I have a private gem server protected by http basic authentication. Currently, I'm storing the credentials as environment variables and have this line at the top of my Gemfile:</p>
  
  <pre><code>source "https://#{ENV['GEMS_USERNAME']}:#{ENV['GEMS_PASSWORD']}@gems.myserver.com"
  </code></pre>
  
  <p>So far so good, and when I run bundle everything seems to work. But than I looked at the generated Gemfile.lock and noticed that the credentials for my server got hardcoded there.</p>
  
  <pre><code>GEM
    remote: https://rubygems.org/
    remote: https://username:password@gems.myserver.com/
  </code></pre>
  
  <p>Is there a way to prevent this from happening? I don't want to push my credentials into the git repo.</p>