Jeff Bailey
Written by Jeff Bailey

Learning resources, opinions, and facts about technology.

Push declined due to email privacy restrictions on GitHub.

Reading Time: 0.8 minutes
Listen to this post

Push declined due to email privacy restrictions is an error you may receive if you push code to GitHub.

This error occurs when.

To remedy this, run these commands after finding your noreply email within the GitHub Email Settings.

Alternatively, download and run this set_global_github_email.sh shell script in the root of your git repository.

git config --global user.email "<Numeric Value>+<Your GitHub Username>@users.noreply.github.com"
git rebase -i
git commit --amend --reset-author
git rebase --continue
git push

See this Stack Overflow question for more details.