Illegal environment variable name for gem repo mirror setting

Skip to first unread message

Jack C

Apr 22, 2016, 2:27:40 PM4/22/16
to ruby-bundler

Currently it is technically "possible" to set a mirror for a gem repo using environment variables. For example, use "BUNDLE_MIRROR__HTTPS://FOO__RUBYGEMS__ORG/" to set a mirror for the repo "". Unfortunately the name of this environment variable is illegal. If I do "export BUNDLE_MIRROR__HTTPS://FOO__RUBYGEMS__ORG/=", I got an error "not a valid identifier". Is it possible to escape the illegal characters here (namely : and /)?


André Arko

Apr 22, 2016, 2:29:29 PM4/22/16
It seems that the spec says the only illegal character is “=“, which we don’t use: That said, it might be worth it to see if there’s a way to accommodate implementations that only support [a-zA-z_].

You received this message because you are subscribed to the Google Groups "ruby-bundler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

Tim Moore

Apr 22, 2016, 2:57:38 PM4/22/16
There was a change made in this pull request to allow you to specify credentials in the environment using just the hostname rather than the full URI


It doesn't look like the same pattern is currently supported for mirrors, unfortunately, but maybe someone could submit a pull request to add it?

-- Tim

Reply all
Reply to author
0 new messages