-
Notifications
You must be signed in to change notification settings - Fork 94
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
Scope issue on push with multiple sub-repositories in GCR #207
Comments
What version of If you built from |
I was using |
Ah! This is most likely a limitation of using manifest-tool from within a container. If you installed the credential helper that is on the host and configured as such on the host. The container, unless you mount all the right places inside the container, has no idea about the credential helper. I believe if you try It might be an interesting enhancement to add popular credential helpers to the container image, but there also might be additional steps (e.g. some cred helpers are going to want access to environment variables that are not set inside the container without specifically adding them) to get them to work properly. |
Nah this is part of a CI build, I installed the credential helper directly in the container. This container is running on a k8s cluster, so even if I wanted I wouldn't be able to install the helper on the host. |
Looks like this is not any issue with the credential helper anyway; I just verified/tested that there are no issues with using the GCR cred helper. This might be a scope issue with the initial auth; looks like you are using subrepos for the "input" architectures? e.g. /multiarch-container/amd64 for 64-bit Intel, /multiarch-container/arm64 for ARM64v8, etc. The scope of the auth uses the initial repo (from the log: |
Okay on my side I can try to push them in the same repo to confirm the issue. Thanks! |
It would be great if you could handle creds inside the container the way kaniko does. I'm trying to create a bunch of multi-architecture images with kaniko and write a single ---
image: registry/repo:123456-linuxarm64v8
platform:
os: linux
architecture: arm64
variant: v8 which in a later stage, I want to gather those artifacts and merge them with yq ea '. as $item ireduce([]; . + $item) | {"image": env(IMAGE_URL), "tags": ("${TAGS}" | envsubst | split(" ")), "manifests": . }' image_manifests/* > manifest.yaml
manifest-tool push from-spec manifest.yaml The problem is I don't know which registry the developers want this image to go to and I'd like |
@waddles seems reasonable to enhance the container with the cred helpers, but this issue has kind of morphed from what turns out the root cause was (looks like a |
Sure, thanks for asking! Sorry I didn't have time to test the scope yet, will try today |
Sorry it's been a while. Just to confirm it does work with |
Using docker-credential-gcr configured like this:
I get a 401 Unauthorized with
manifest-tool
:I double-checked, image can be pulled with other tools.
The text was updated successfully, but these errors were encountered: