You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when pushing using personal access token -- the requested URL returned error: 403 #52
Context:
Was checking out multiple private repos and was copying a file from a private repos to a public repos in the workspace, then committing and pushing. The push would fail with a 403.
Error:
remote: Permission to my-repos denied to github-actions[bot].
fatal: unable to access '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/.../my-repos.git/': The requested URL returned error: 403
By running this command we can see any of config settings being used for our repos:
git config -l
We discovered the checkout action is executing a command like this:
Once it is installed, the first push operation (or pull) displays a prompt allowing to reach the remote GitHub. It didn't work well with the Personal Access Token, but this tool also allows to open the GitHub HTML page, by providing the "classic" username and password. It apparently stores the credentials in a cache. Commits and pushes both work with the Bash console and TortoiseGit. I'm not sure what happens when the token expires though...
Activity
ad-m commentedon Apr 5, 2020
Thank for you analysis. At that moment I don't have spare time to get that value, reset default value and restore. PR are welcome.
ad-m commentedon May 26, 2020
@fc, could you verify that regarding #46?
fc commentedon May 26, 2020
@ad-m we ended up not using this action to achieve what we wanted so I am unable to validate unfortunately.
basnijholt commentedon Jul 13, 2020
I am seeing this issue too here, however, in #55 people report that it's solved for them...
edit: I wasn't using the right scopes for my PAT, it works now.
IronCore864 commentedon Feb 10, 2021
#44 (comment)
This solved the issue for me. Hope this helps others.
ftheeten commentedon Sep 10, 2021
Using the standalone and cross-platform "GCM" (Git Credential Manager) indirectly solved this problem for me (on a Windows 1O platform)
I installed it from this resource : https://github.com/microsoft/Git-Credential-Manager-Core/releases/tag/v2.0.498
(https://github.com/microsoft/Git-Credential-Manager-Core)
Once it is installed, the first push operation (or pull) displays a prompt allowing to reach the remote GitHub. It didn't work well with the Personal Access Token, but this tool also allows to open the GitHub HTML page, by providing the "classic" username and password. It apparently stores the credentials in a cache. Commits and pushes both work with the Bash console and TortoiseGit. I'm not sure what happens when the token expires though...
xianshenglu commentedon Apr 30, 2022
For me, I used
permissions: write-allto make it work with my customgit pushcommand.liqwang commentedon Mar 14, 2023
This really helps me, thanks a lot!
Fix bug, refer to ad-m/github-push-action#52 (comment)