Open guiadco opened 4 years ago
GITHUB_TOKEN
is tied to the repository where the action runs. It cannot push on another repository since it does not have right for it.
You'll have to use a PAT instead.
This example deploy on the same repository.
I use it to deploy from my develop branch to my gh-pages branch.
There's a report in PR #3 that some repos require use of PAT
even for the same repository, based on two-factor authentication settings. Can you verify that works?
I'm using an organization and a private repository without two-factor.
I try on another organization with and without two-factor and it's the same error.
After i try to disable the two-factor in my personnal account to see if and it fail too.
Maybe it could be necessary to use the PAT if we are inside an organization.
If i insert the PAT in the github_token input:
it works.
I just ran into the same issue, and the solution from @guiadco also worked for me. The following was the config for me that failed:
uses: seanmiddleditch/gha-publish-to-git@master
with:
branch: master
github_token: ${{ secrets.GITHUB_TOKEN }}
When i use GITHUB_TOKEN with github_token, i have:
Result: