Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCE_METADATA_HOST not passed through to credential-helper #734

Open
dziemba opened this issue Nov 7, 2024 · 0 comments
Open

GCE_METADATA_HOST not passed through to credential-helper #734

dziemba opened this issue Nov 7, 2024 · 0 comments

Comments

@dziemba
Copy link

dziemba commented Nov 7, 2024

When using docker-credential-gcr with regular docker, setting the GCE_METADATA_HOST environment variable tells it to use the given endpoint instead of the default one to fetch tokens via ADC.

This does not work with rules_oci since the environment variable is not passed on to the credential helper process.

I believe the trivial fix would be to just add it to this list:
https://github.com/bazel-contrib/rules_oci/blob/a195e365/oci/private/authn.bzl#L369

Is that correct? Would it be acceptable to add it there? If yes, I'm happy to create a PR for it.
If that use-case is too specific and you'd rather not add the env to the list, is there any other way to expose the correct settings, i.e. make the list of pass-thru-envs dynamic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant