GitHub Actions - Error when doing a git push inside an action #26968
-
Hello. I am trying to do a git push from a GitHub Action step, but I am having the following error:
I think it´s related to authentication, but shouldn’t Github Actions handle this automatically? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey, I was able to get this working. Here is an example: https://github.com/pkgjs/gh-pages/blob/master/entrypoint.sh Basically there are two environment vars you can use Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
download gk bisa di unduh |
Beta Was this translation helpful? Give feedback.
Hey, I was able to get this working. Here is an example:
https://github.com/pkgjs/gh-pages/blob/master/entrypoint.sh
Basically there are two environment vars you can use
GITHUB_ACTOR
andGITHUB_TOKEN
. Then use the https push url. To get the token passed in you need to use the secrets as documented here: https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secretHope this helps.