Why I have to setup git config user and email manually when need to push to the repo?

If I want to push to a repository from a GitHub action I need to set my username and email in git config every time.

Why this is not done set automatically with the “github actions” user by default? It could be done by the “actions/checkout” or having some kind of  “setup-git” action.

Sorry. I wanted to post this in “GitHub Actions” forum. It´s possible to move this thread there? Can´t find a way to do it myself.

Hi @brpaz,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our community organized so users can more easily find information.

As you’ll notice, your topic is now here in the Actions board. No action is needed on your part; you can continue the conversation as normal here.


Hi @brpaz ,

Glad to see you in Github Commnunity Forum!

‘actions/checkout’ will not help to set user email/name, you can use command ‘git config -l’ to check the git configuration.

For some git operations, it will need to confirm who you are, hence you need to set the user name and email manually.

If you’d like to add this feature for actions/checkout or need actions like ‘setup-git’, according to the policy, it’s more appropriate to raise a feature_request ticket in the link: https://support.github.com/contact/feedback?contact%5Bcategory%5D=actions