Confusing error message when pushing with Block command line pushes that expose my email
enabled on GitHub #1910
Description
Update by @rsese with updated repro steps and description
If you have Block command line pushes that expose my email
enabled in your GitHub settings and try to push a commit with a private email, you see this error notification:
The tip of your current branch is behind its remote counterpart. Try pulling before pushing.
To force push, hold cmd or ctrl while clicking.
The error with more information shown on the command line and in devtools in Atom is:
stderr: remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
Steps to reproduce:
- Enable
Block command line pushes that expose my email
in https://github.com/settings/emails - For some repo, add and commit a change that uses a private email address
- Push the change
Expect the error message to explain the underlying error, actual behavior is the error message mentioned above.
Prerequisites
- Have you tried to reproduce the problem in Safe Mode?
Yes - Have you followed all applicable steps in the debugging guide?
Yes - Have you checked the FAQs on the message board for common solutions?
Yes - Have you checked that your issue isn't already filed?
Yes
Description
When attempting to push a commit to GitHub, I get the following error;
The tip of your current branch is behind its remote counterpart. Try pulling before pushing.
To force push, hold cmd or ctrl while clicking.
Force push also throws the same error.
Steps to Reproduce
- Create a new, empty repo, then clone it into atom
- Edit a file, and create a commit
- Attempt to push the commit
Expected behavior:
I expected it to push the commit and change on GitHub
Actual behavior:
It threw the above error
Reproduces how often:
100% of the time
Versions
Atom : 1.34.0
Electron: 2.0.16
Chrome : 61.0.3163.100
Node : 8.9.3
apm 2.1.3
npm 6.2.0
node 8.9.3 x64
atom 1.34.0
python
git
visual studio 2015
Additional Information
I have absolutely no idea what I'm doing wrong here.
This is a fresh install of atom. All I did was clone the repo, link my GitHub account, make a commit, and try to push it.
This happens with any repo, regardless of where I clone it from.
Searching for that error message results in one thing which says it's because I need to pull, but the repo is 100% up to date without question.