Cannot push these commits as they contain an email address marked as private on GitHub

Cannot push these commits as they contain an email address marked as private on GitHub

Go to settings -> emails and disable Keep my email address private.

The other answers are fine for future commits, but dont help for prior commits that contain a public email address. If you want to keep your email private, then you should modify the prior commits instead of changing your settings. Use git cmd, like:

git commit --amend --author=ericraider33 <[email protected]>

And fill in with auto-generated email address that GitHub provides to each user.

Cannot push these commits as they contain an email address marked as private on GitHub

I ran into this problem too. It is an easy fix in Github Desktop by going to File -> Options -> Git and clear the Username and Email fields and save it. Then if you are logged in to GitHub it will fill them in with correct information.

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *