Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set anonymized email address on github?

Tags:

git

github

email

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.

like image 568
Dariux Avatar asked Oct 21 '25 14:10

Dariux


2 Answers

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 :

The email address is 6602631+darius-v@users.noreply.github.com

Maybe I did something wrong that day when I created this post. I was able to push.

like image 183
Dariux Avatar answered Oct 23 '25 06:10

Dariux


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-reply email address as your commit email address. To use your noreply email address for commits you push from the command line, use that email address when you set your commit email address in Git. To use your noreply address for web-based Git operations, set your commit email address on GitHub and choose to Keep my email address private.

like image 34
osowskit Avatar answered Oct 23 '25 06:10

osowskit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!