diff --git a/oci/private/authn.bzl b/oci/private/authn.bzl index 475a6cc8..47e4be3e 100644 --- a/oci/private/authn.bzl +++ b/oci/private/authn.bzl @@ -285,7 +285,7 @@ def _get_token(rctx, state, registry, repository): return state["token"][url] auth = None - if pattern["login"] == "": + if pattern.get("login", None) == "": if not rctx.os.environ.get("OCI_ENABLE_OAUTH2_SUPPORT"): fail(IDENTITY_TOKEN_WARNING)