-
Notifications
You must be signed in to change notification settings - Fork 234
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
Error when pushing using personal access token -- the requested URL returned error: 403 #52
Comments
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 we ended up not using this action to achieve what we wanted so I am unable to validate unfortunately. |
#44 (comment) |
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... |
For me, I used on:
push:
branches:
- dev
permissions: write-all
jobs: |
This really helps me, thanks a lot! |
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:
By running this command we can see any of config settings being used for our repos:
We discovered the checkout action is executing a command like this:
Reference:
https://github.com/actions/checkout/blob/master/adrs/0153-checkout-v2.md#pat
The fix is to do this:
It's seems unlikely that this could lead to side effects but it may be desirable to re-set this value after the push is completed.
Sorry for lack of PR, we ended up not using your action and just incorporated what we ended into our workflow file.
The text was updated successfully, but these errors were encountered: