Just a note that I discovered today that the PAT may require the 'workflow' scope if the rebase involves workflow files.
I got this error with a PAT that didn't have that:
Run peter-evans/rebase@v1
1 pull request(s) found.
Syncing repository: flcdrg/JsonToEnvironmentConverter
Getting Git version info
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
Checking out the ref
/usr/bin/git log -1 --format='%H'
'9b8ca83dd2e2d133c7a0de5f33a7b0a170ae5f46'
Attempting rebase of head ref 'master' at 'pdeffendol/JsonToEnvironmentConverter'.
/usr/bin/git remote add b4f7c8ae-a1f5-47a5-8259-8f104f9f538c https://github.com/pdeffendol/JsonToEnvironmentConverter
Fetching head ref 'master'.
Checking out head ref 'master'.
Setting committer to match the last commit on the head ref.
Rebasing on base ref 'master'.
Pushing changes to head ref 'master'
/usr/bin/git push --force-with-lease b4f7c8ae-a1f5-47a5-8259-8f104f9f538c HEAD:master
To https://github.com/pdeffendol/JsonToEnvironmentConverter
! [remote rejected] HEAD -> master (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/dotnetcore.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/pdeffendol/JsonToEnvironmentConverter'
Error: The process '/usr/bin/git' failed with exit code 1
Just a note that I discovered today that the PAT may require the 'workflow' scope if the rebase involves workflow files.
I got this error with a PAT that didn't have that: