gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

403 Forbidden Error unrelated to PATs/Permissions

Open martleung opened this issue 1 year ago • 1 comments

Description

We are facing the below error when using the GitHub GEI to migrate repositories between GHEC to GHEMU.   Git source migration failed. Error message: the server responded with status 403 Error class: Faraday::ForbiddenError.

We have validated the PAT for both the source org in GHEC and the target org in GHEMU. This included checking the scope and that it's been SSO authorised - even tested these PATs by performing GH CLI commands against the respective orgs.   We are quite certain the issue is in relation to GEI service connecting to the source GHEC/org as the blank repository is being created in the target GHEMU. We have checked IP Allowlist is not enabled within GHEC.

Can further details be provided on the below error?

Reproduction Steps

Run the command gh gei migrate-repo --github-source-org SOURCE_ORG --source-repo SOURCE_REPO --github-target-org TARGET_ORG --verbose

martleung avatar May 09 '24 07:05 martleung

Quick update on the above. The issue was found to be due to a newly introduced requirement for the source PAT to require admin:org (as opposed to read:org which was working 2-3 weeks ago).

I noticed that the GitHub documentation just got updated to indicate the need to use admin:org against the source PAT - so no further action required.

martleung avatar May 15 '24 06:05 martleung