You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, it looks like rb_bundle_fetch does not support installing gems from private repositories with authentication. I believe this is from the implementation using repository_ctx.download. I believe this could be accomplished by exposing the headers argument here in the rb_bundle_fetch arguments: https://bazel.build/rules/lib/builtins/repository_ctx#download
Example - bundle fetch hits 401 unauthorized here due to no way to pass credentials to request:
However rb_bundle is to be deprecated and docs recommend using rb_bundle_fetch instead. There are also numerous advantages pointed out in rb_bundle_fetch described here: #48
Or perhaps there is a way to use rb_bundle_fetch with private repos?
The text was updated successfully, but these errors were encountered:
It's not obvious, but you should be able to provide credentials using Bazel --credential-helper flag. The credentials exposed by it should be propagated to repository_ctx.download per bazelbuild/bazel#13709 (comment).
#62 is about installing gems from Git repositories, whether they are private or not. However, installing from private Bundler mirrors should also work.
So far, it looks like
rb_bundle_fetch
does not support installing gems from private repositories with authentication. I believe this is from the implementation usingrepository_ctx.download
. I believe this could be accomplished by exposing theheaders
argument here in the rb_bundle_fetch arguments: https://bazel.build/rules/lib/builtins/repository_ctx#downloadExample - bundle fetch hits 401 unauthorized here due to no way to pass credentials to request:
rb_bundle
can do this successfully, because these bundler environment variables can pass through:However rb_bundle is to be deprecated and docs recommend using rb_bundle_fetch instead. There are also numerous advantages pointed out in rb_bundle_fetch described here: #48
Or perhaps there is a way to use rb_bundle_fetch with private repos?
The text was updated successfully, but these errors were encountered: