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

Scope for fine-grained PAT #82

Closed
KittyChiu opened this issue Nov 8, 2023 · 3 comments
Closed

Scope for fine-grained PAT #82

KittyChiu opened this issue Nov 8, 2023 · 3 comments
Labels

Comments

@KittyChiu
Copy link

What is the required scope to run actions-sync for destination fine-grained PAT?

@younsl
Copy link

younsl commented Feb 29, 2024

In my opinion(I'm not sure though), actions-sync doesn't support fine-grained PAT not yet.

Environment

  • AWS EC2 Workload (amd64)
  • GHES v3.11.2 ami 2023-12-26 14ec057d89
  • GHES Actions Sync v0.2

I already downloaded actions-sync using wget on EC2 local:

wget https://github.com/actions/actions-sync/releases/download/v202303192358/gh_202303192358_linux_amd64.tar.gz
tar -zxvf gh_202303192358_linux_amd64.tar.gz

Result running actions-sync command

My fine-grained PAT include below permissions:

Contents: Read and write
Metadata: Read-only
Workflows: Read and write

Run actions-sync command locally in GHES EC2 instance:

$ ./actions-sync sync \
  --cache-dir "/tmp/cache" \
  --destination-token "github_pat_11AA..." \
  --destination-url "https://github.<REDACTED>.<REDACTED>" \
  --repo-name actions/setup-node:actions/setup-node

It fails with a 401 Bad credentials error:

fetching * refs for actions/setup-node ...
not using impersonation for the requests
...
error creating github repository `actions/setup-node`: error retrieving authenticated user: GET https://github.<REDACTED>.<REDACTED>/api/v3/user: 401 Bad credentials []

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Apr 19, 2024
Copy link

github-actions bot commented May 3, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants