I’m trying to copy markdown files from one repo to another and push them through Github Actions, but run afoul of permission problems. It specifically has to do with pushing to another repo, as manipulating a singular repo has worked.
Looking at other questions about this, it seems the problem is related to the way github actions uses an http.extraheader option to send the original token, which applies only to the original repository and not the target I’m pushing to.
However, trying to override this habit through the above fix has yielded no results. In fact, it yields the error below of the key I’m trying to override.
error: invalid key: http.https://github.com/.extraheader?
remote: Permission to repo-owner/target-repo.git denied to github-actions[bot].
fatal: unable to access ‘https://github.com/repo-owner/target-repo/’: The requested URL returned error: 403
Error: Process completed with exit code 1.
I check out both repos side to side. Both of them have the same owner. Then I run a python script to copy the md files to the checked out target repo. This is the part that is supposed to push:
Is there anything I’m missing? Is there another way to get the pushing to another repo done? This seems like something that should be easy to do, and yet I keep running into permission issues.