-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Setting credentials for gem sources via environment variable does not work if domain name contains dash #4241
Comments
I can set an env var with a dash fine using Ruby, maybe you just need to escape the dash? |
|
You can also always use |
Thanks for your quick reply, and for the solutions! I'd like to set the environment variable using You can close this if it is out of scope, as there are alternative ways I can work around this problem. Thanks again! |
Yeah, sorry, does kinda feel out of scope to me :/ |
Sure, no worries. If it hasn't come up until now, it's most probably an edge case. |
Hi, sorry to bother again, I will quickly outline my use case, maybe you re-evaluate your stance: I'm using Gitlab CI for our internal gems. Gitlab CI has a feature which allows you to specify so-called secret environment variables, which are injected in the CI run. We have several internal gems that reference each other, and using any method other than the environment variable approach would force me to include the credentials of our internal gem host in the repository, which I'd like to avoid. I have raised this issue with Gitlab, but they are unwilling / not able to allow environment variables with dashes, as these are invalid in bash (and they use bash to set these environment variables). Thanks again for your attention! |
Hi,
I have a gem host at
gems.with-dash.com
, and I cannot set the credentials using an environment variable (as explained here) because dashes are not allowed in environment variable names (it would have to beBUNDLE_GEMS__WITH-DASH__COM
, which is invalid at least in bash).Am I missing something here? I'd be willing to put together a pull request that converts the dash to an underscore in this case. Would this be worthwhile?
The text was updated successfully, but these errors were encountered: