GitHub Actions - Error when doing a git push inside an action

Hello.

I am trying to do a git push from a GitHub Action step, but I am having the following error:

fatal: could not read Username for 'https://github.com': No such device or address

I think it´s related to authentication, but shouldn’t Github Actions handle this automatically?

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 and GITHUB_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-secret

Hope this helps.

7 Likes

download gk bisa di unduh