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

Setting up Registry with ghcr.io #699

Closed
sebastianarena opened this issue Nov 13, 2024 · 5 comments
Closed

Setting up Registry with ghcr.io #699

sebastianarena opened this issue Nov 13, 2024 · 5 comments

Comments

@sebastianarena
Copy link

To Reproduce

I'm having trouble setting up the registry to use ghcr.io using my username and a token (classic) that I created for this specific purpose

  1. If I set it up like this:

registry-1

I will get the following error

registry-2

Is it trying to upload to docker.io even though I configured something else?

  1. Also if I try to put my Github Org Name as an image prefix, it will try to use that as the actual registry URL (I blurred my org name in the pictures)

registry-3

registry-4

Thanks for this amazing product

Current vs. Expected behavior

The image is uploaded to ghcr.io

Provide environment information

Operating System: Ubuntu 24.04 LTS
Dokploy: 0.10.10
VPS: Hetzner

Which area(s) are affected? (Select all that apply)

Installation, Docker

Additional context

No response

@sebastianarena sebastianarena added the bug Something isn't working label Nov 13, 2024
@Siumauricio
Copy link
Contributor

It seems that the dns resolution was modified on the server for some reason.

docker/for-mac#1317

Recently I added steps for add ghcr account however I didn't have any issues, I will check but it seems like is more a dns error from the host

https://docs.dokploy.com/docs/core/registry/ghcr

@sebastianarena
Copy link
Author

@Siumauricio thanks for the reply

I can't seem to make it work no matter what I do.

Here's an abstract of what it says when trying to upload it

📦 [Enabled Registry] Uploading image to cloud | <redacted>:latest | https://ghcr.io
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-stores

Login Succeeded
The push refers to repository [docker.io/library/<redacted>]
a2058383e5e0: Preparing
2a28034070b4: Preparing
d129a0daa9ce: Preparing
172e602b0dc5: Preparing
14c33253c409: Preparing
58b2036d19a8: Preparing
e5174df11535: Preparing
75654b8eeebd: Preparing
e5174df11535: Waiting
75654b8eeebd: Waiting
58b2036d19a8: Waiting
denied: requested access to the resource is denied
Error ❌
denied: requested access to the resource is denied

As you can see, it says Login Successful, even testing like your docs says, shows a success, but later it fails.

I don't know why it says docker.io when it should be ghcr.io? or maybe that is correct because its just the name of the image?

Adding a prefix changes the path from /library/ to /prefix/
I don't think it's DNS otherwise it would fail login as well
And the curious thing I noticed was that if I used my Github ORG name as a prefix (assuming it would upload the packages to my org not my username) shows the DNS error, like it's confusing which API to use if the Prefix = ORG name, which is weird.

Don't know what else to try.
Let me know if this helps.
Thanks.

@ouestlabs
Copy link

@Siumauricio thanks for the reply

I can't seem to make it work no matter what I do.

Here's an abstract of what it says when trying to upload it

📦 [Enabled Registry] Uploading image to cloud | <redacted>:latest | https://ghcr.io
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-stores

Login Succeeded
The push refers to repository [docker.io/library/<redacted>]
a2058383e5e0: Preparing
2a28034070b4: Preparing
d129a0daa9ce: Preparing
172e602b0dc5: Preparing
14c33253c409: Preparing
58b2036d19a8: Preparing
e5174df11535: Preparing
75654b8eeebd: Preparing
e5174df11535: Waiting
75654b8eeebd: Waiting
58b2036d19a8: Waiting
denied: requested access to the resource is denied
Error ❌
denied: requested access to the resource is denied

As you can see, it says Login Successful, even testing like your docs says, shows a success, but later it fails.

I don't know why it says docker.io when it should be ghcr.io? or maybe that is correct because its just the name of the image?

Adding a prefix changes the path from /library/ to /prefix/ I don't think it's DNS otherwise it would fail login as well And the curious thing I noticed was that if I used my Github ORG name as a prefix (assuming it would upload the packages to my org not my username) shows the DNS error, like it's confusing which API to use if the Prefix = ORG name, which is weird.

Don't know what else to try. Let me know if this helps. Thanks.

try to remove the protocol in the url, it should look like : ghcr.io/your_image

@Siumauricio
Copy link
Contributor

@ouestlabs Good catch, very probably is because they are using https at the start of the registry url

@Siumauricio Siumauricio added awaiting-response and removed bug Something isn't working labels Nov 17, 2024
@Siumauricio
Copy link
Contributor

Feel free to reopen if you still have the same issue after using the exact same guide we have in docs

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

No branches or pull requests

3 participants