Skip to content

Commit

Permalink
oci_pull: add setting for disabling token retrieval in rules_oci
Browse files Browse the repository at this point in the history
This is helpful when using an external credential helper
(via --credential_helper).
  • Loading branch information
malt3 committed Jan 3, 2025
1 parent 843eb01 commit 9bf0c15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions oci/private/authn.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ To enable this feature, add `common --repo_env=OCI_ENABLE_OAUTH2_SUPPORT=1` to t
"""

def _get_token(rctx, state, registry, repository):
if rctx.os.environ.get("OCI_DISABLE_GET_TOKEN"):
return {}
pattern = _get_auth(rctx, state, registry)

for registry_pattern in _WWW_AUTH.keys():
Expand Down

0 comments on commit 9bf0c15

Please sign in to comment.