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

Authentication to GHCR is now possible via GITHUB_TOKEN #13037

Closed
MakisH opened this issue Jun 21, 2021 · 4 comments · Fixed by #13039
Closed

Authentication to GHCR is now possible via GITHUB_TOKEN #13037

MakisH opened this issue Jun 21, 2021 · 4 comments · Fixed by #13039

Comments

@MakisH
Copy link

MakisH commented Jun 21, 2021

File: ci-cd/github-actions.md

In this documentation page, the user is instructed to create a Personal Access Token password: ${{ secrets.GHCR_TOKEN }}. I was confused on how to do this in the context of an organization, only to find out that there is actually an easier way now: just using GITHUB_TOKEN: https://docs.github.com/en/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry#authenticating-to-the-container-registry

The Container registry now supports GITHUB_TOKEN for easy and secure authentication in your workflows. If your workflow is using a personal access token (PAT) to authenticate to ghcr.io, then we highly recommend you update your workflow to use GITHUB_TOKEN.

The fix here would be rather straight-forward (replace GHCR_TOKEN with GITHUB_TOKEN, but I am not sure if this would have any side-effects in other pages.

I hope I am not just more confused through this process.

@thaJeztah
Copy link
Member

/cc @crazy-max ptal

@crazy-max
Copy link
Member

@MakisH Yes this part is "outdated", we should use the ephemeral GITHUB_TOKEN as explained on the login-action repo. (see docker/login-action#59).

@thaJeztah Do I open a PR to update documentation?

@thaJeztah
Copy link
Member

@crazy-max if you know what needs updating, yes, feel free to open a PR to update https://docs.docker.com/ci-cd/github-actions/

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

@docker docker locked and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants