I got error when commiting:
Your push would publish a private email address.
I see here it suggests set anonymous email address.
Your push would publish a private email address error
But I read documentation and it just shows to add in https://github.com/settings/emails
which requires verification. But I just set some random email [email protected] which I do not have. But the documentation says to verify it. I do not get it. Or do I need to create some real email or use some temporary email service just for this thing so I could verify?
I do not even understand why git push started to require some email at all. Few days ago I was pushing commits and there were no such error.
Update
Ok, this might be because I forked a repository and made a commit. I done a commit first time on forket repository. I cannot see where my email is actually visible in that commit.
After reading osowskit answer (thank you osowskit) I decided to try again what I tried unsuccessfully before, and this time it worked.
I guess I have to set it like this:
git config --global user.email "[email protected]"
The email address is from the email settings page :

Maybe I did something wrong that day when I created this post. I was able to push.
But I just set some random email [email protected] which I do not have. But the documentation says to verify it. I do not get it.
GitHub will anonymize your existing email address when selecting to keep your email address private but requires you have a valid, verified email address. Note you will need to use the GitHub provided replyto email in your Git client.
From the docs
If you'd like to keep your personal email address private, you can use a GitHub-provided
no-replyemail address as your commit email address. To use yournoreplyemail address for commits you push from the command line, use that email address when you set your commit email address in Git. To use yournoreplyaddress for web-based Git operations, set your commit email address on GitHub and choose to Keep my email address private.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With