-
Notifications
You must be signed in to change notification settings - Fork 8
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
401 Unauthorized pulling from private registry #47
Comments
Hi @anthony-zawacki sorry for the delayed response, are you able to patch this same image locally using copa or does it result in the same error? Also, since you are able to pull the image in the workflow, can you try the containerd image store approach for local images to see if that also results in the same error? |
This is a touch painful. :) At the top of my workflow, I've added:
However, aquasecurity/[email protected] runs and builds a local image in docker before these steps run. Trying to use the crazy-max docker server fails on the trivy step because the local image they built as part of the set up to the action doesn't exist in that docker server. To work around this, in my environment configuration section, changed it to log into the ECR registry with both the "standard" docker server as well as the crazy-max docker server:
Using that, I can see both servers, the crazy-max one running 27.2.0 and the "standard" one running 26.1.3. I updated my image pull section to pull the target image to both docker servers:
This allows trivy to run using the "standard" docker server and copa to run using the crazy-max docker server, both accessing different copies of the same image. The copa step now looks like:
This appears to work, I now get to where copa times out trying to update the image:
This is project-copacetic/copacetic#714 which has been fixed, but not yet released. Is there any facility to run a nightly build of copa of some sort where I could test to see if it actually successfully makes it to the end of the patching, or do we need to wait for 0.7.1 release? I have gotten past the step with a custom-built copa binary where I had fixed the missing |
This issue seems to be related to #46 and using the --docker-host flag within Trivy. We have also released a new version of copa with microdnf issue resolved :) Let me know if theres any other issues! |
Issue #16 is closed indicating that public/private registries are supported, but
project-copacetic/copa-action@main
fails to be able to pull from an ECR registry. I've logged into the registry every way in the github action that I could think to do it. As far as I understand, there are no parameters to the buildx container that runs, so I'm not sure how it's supposed to authenticate with the registry.The documentation at https://github.com/project-copacetic/copa-action?tab=readme-ov-file#ways-to-connect-to-buildkit seems to indicate buildx (Option 1) is the only supported way to connect to private registries.
Selected github action logs:
Example of being able to pull the image locally, can be done as a regular user or as super use, both are successful:
Running the copa action fails with 401 unauthorized:
This is a private registry and private git repository, but the full contents of the github workflow is:
In my case, I have copied the original keycloak image from ironbank to our ECR with a tag of 25.0.1-0 and I'm attempting to patch the image and update the
25.0.1
tag for keycloak with the output from copa. I don't think ironbank images have anything special about them, we could copyregistry.access.redhat.com/ubi9/ubi-minimal:9.4-949
to our private ECR asregistry.access.redhat.com/ubi9/ubi-minimal:9.4-949-0
and then attempt to run copa against it and have the same results.The text was updated successfully, but these errors were encountered: