We have a private gem’s source that is configured with either:
bundle config gems.myprivatesource.com user:pass
OR with the ENV
BUNDLE_RUBYGEMS__PKG__GITHUB__COM: user:pass
When using bundle exec jets deploy
locally it does not seem to copy the already downloaded gem because ruby_packager
is using a fixed “bundled_gems” folder. Not much of a problem, since it downloads everything again and the deployment process can continue.
However, I am facing issues when running at GitHub Action.
Jets::Builders::RubyPackager.bundle_install
creates a .bundle/config
file without my private gems configuration. Moreover, it is running bundle with with_unbundled_env
so my ENV does not work either. Since the ENVs are ignored and the config file does not include the required line for the private gems, the process fails with: Authentication is required for rubygems.pkg.github.com
Is anyone facing similar issues?
Any ideas on how to overcome it?