-
Notifications
You must be signed in to change notification settings - Fork 70
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
What is a valid JSON for CNB_REGISTRY_AUTH
?
#277
Comments
@ajdergute Here's an example using docker.io: CNB_REGISTRY_AUTH='{"index.docker.io":"Basic YWVt<redacted>="}' |
Thank you very much. Is this something which should be mentioned in an appendix? |
@ajdergute the spec does specify the structure of CNB_REGISTRY_AUTH -
However, reading through that block of text, I do understand how that can be confusing. Would you like to make a PR to the spec repo with the appendix structure/example? That would be much appreciated! |
We need a better documentation and examples please ! @natalieparellano |
I experiment an issue to try to set the credential using an internal container registry running on openshift cluster where tekton is deployed. I can log successfully using the same credential
but that fails
passed to CNB_REGISTRY_AUTH as ENV VAR
If you decode using base64 the string
|
The encoded password contains a newline at the end. I think it should be: |
I did a test using your string and error is still there ! I dont think that a newline is included end of the string
@natalieparellano Could the problem not been related to the Authentication itself but instead to a HTTPS (= certificate) issue - https://github.com/buildpacks/lifecycle/blob/3f1a3461ca9171e677ac95100a06b8fa8882b0d2/cmd/lifecycle/main.go#L141-L150 ? |
The newline was also the first thing I noticed. It was part of your value before, which would cause issues. A certificate issue could be your issue for sure. Does your registry respond to |
Would it be possible when we set
otherwise it is really hard to figure out why by example here we have such an issue as the messgae logged is too generic Code - https://github.com/buildpacks/imgutil/blob/main/remote/remote.go#L531
|
Note, the verbose log messages will be available in lifecycle 0.17.0 |
The registry authentication chapter (ihttps://github.com/buildpacks/spec/blob/main/platform.md#registry-authentication) mentions
CNB_REGISTRY_AUTH
as a way to provide authentication to a registry. Unfortunately I didn't find how exactly this JSON is structured. Is there a schema?I try to push an image to a local registry with podman on my machine. This is a testing step before integration into our GitLab CI.
The text was updated successfully, but these errors were encountered: