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

PAT creation section: possible incorrect info #2660

Closed
niraj8 opened this issue Jan 7, 2021 · 14 comments · Fixed by #3746
Closed

PAT creation section: possible incorrect info #2660

niraj8 opened this issue Jan 7, 2021 · 14 comments · Fixed by #3746
Labels
ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team packages This issue or pull request should be reviewed by the docs packages team

Comments

@niraj8
Copy link

niraj8 commented Jan 7, 2021

What article on docs.github.com is affected?

This one -> https://docs.github.com/en/free-pro-team@latest/packages/guides/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry

What part(s) of the article would you like to see updated?

Authenticating with the container registry

The article mentions create a PAT with write:packages but without repo access

Screenshot 2021-01-08 at 12 08 19 AM

This is not possible right now👇
Screenshot 2021-01-08 at 12 09 32 AM

Additional information

@welcome
Copy link

welcome bot commented Jan 7, 2021

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Jan 7, 2021
@chiedo chiedo added ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team and removed triage Do not begin working on this issue until triaged by the team labels Jan 11, 2021
@chiedo
Copy link
Contributor

chiedo commented Jan 11, 2021

@niraj8 Thanks for opening an issue! I’ll triage this for the right team to take a look 👀

@thatInfrastructureGuy
Copy link

thatInfrastructureGuy commented Jan 26, 2021

The workaround I used was to create PAT with repo and write:packages permissions. Once the PAT was created I updated the permissions and removed the non-essential repo permissions. I was still able to build and push docker image to ghcr.io registry with the reduced permissions.


Update 03/23/21: This workaround is not working anymore. See #2660 (comment)

@janiceilene janiceilene added the packages This issue or pull request should be reviewed by the docs packages team label Jan 28, 2021
@dgholz
Copy link
Contributor

dgholz commented Feb 17, 2021

Once the PAT was created I updated the permissions and removed the non-essential repo permissions.

I don't see how to edit a PAT's scope once it's created, I can only delete it. How did you remove the permission?

@niraj8
Copy link
Author

niraj8 commented Feb 17, 2021

I don't see how to edit a PAT's scope once it's created, I can only delete it. How did you remove the permission?

Clicking on the title of a token should allow you to edit its scopes
On this page https://github.com/settings/tokens

@giovannidegani
Copy link

Now for me even when editing the repo permissions are selected and greyed out.

@amrwc
Copy link

amrwc commented Feb 28, 2021

Once the PAT was created I updated the permissions and removed the non-essential repo permissions.

I don't see how to edit a PAT's scope once it's created, I can only delete it. How did you remove the permission?

It doesn't work anymore, at least as of today, and the comment above also mentions that it's greyed out:

Now for me even when editing the repo permissions are selected and greyed out.

Screenshot from https://github.com/settings/tokens/<token_id>:

image

@janiceilene
Copy link
Contributor

👋 Hey folks, if you're having any confusion related to what you're seeing in your individual accounts, you should check in with our wonderful support team!

@reimer-atb
Copy link

reimer-atb commented Mar 3, 2021

@janiceilene there is no confusion. The docs state to

deselect the repo scope when creating the PAT.

But this is currently not possible - see screenshot provided above.
Selecting the write:packages scope for a PAT will automatically select the repo scope.
And the repo scope cannot be deselected unless you also deselect the write:packages scope.

According to the docs your PAT needs the write:packages scope to push docker images to the new "improved container registry".

So either the docs are wrong and must be fixed or there is a serious bug in the Create PAT page.

@jmarlena
Copy link
Contributor

jmarlena commented Mar 3, 2021

Hey all! I confirmed this behavior is new and unexpected. I've surfaced this to the packages engineering team. We can update our docs in the meantime! ❤️

@reimer-atb
Copy link

@jmarlena any status update from the packages engineering team? The bug still exists on the Create PAT page. Is there an issue for this, which we can upvote and follow?

Also, the docs still haven't been updated.

@Draya007
Copy link

Errors?

@jmarlena
Copy link
Contributor

jmarlena commented Mar 17, 2021

@philipreimer Sorry for the wait everyone. We have a proposed workaround from the engineering team. I'll follow-up once it's live.

@jmarlena
Copy link
Contributor

Heads up about these workarounds:
A) Use this url https://github.com/settings/tokens/new?scopes=write:packages, which allows you to avoid the automatic repo scope selection in the UI.
B) Now GitHub Container Registry supports using the GITHUB_TOKEN for GitHub Actions workflows so you don't have to use a PAT in a workflow anymore to push docker images to ghcr.io anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team packages This issue or pull request should be reviewed by the docs packages team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants