The problem was being caused by my credentials being cached in Mac’s Keychain Access via the Git config setting
In order to ensure this particular repo was using the Personal Access Token, I followed this Stack Overflow answer:
git config --local --replace-all credential.helper ''to remove all credential helpers just for this repo (make sure to use --local).
git config --local --add credential.helper cacheto add cache back to the local repo.
git pushthen prompted me to login. For password I used the Personal Access Token with workflow scope. The push worked, and the PAO is now cached in the local repo.
refusing to allow a Personal Access Token to create or update workflow .github/workflows/learn-github-actions.yml without workflow scope)
Created new Personal Access Token with
workflowscope and reauthenticated with Github from CLI using
gh auth login
oauth_tokenwith workflow scope
Still receiving same error.
Any thoughts on why this new personal access token might not be working?