Github push issue - wrong error message
Prerequisites
- [X] Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Steps to Reproduce
- Have a Github account with a repo, and email is private
- Clone a repo
- Do any modification or add
- Stage and commit in Git tab
- Click the push Button on bottom right
- Error message shown:
Push rejected
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 same push from git command line:
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Delta compression using up to 4 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 4.44 KiB | 4.44 MiB/s, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6), completed with 6 local objects.
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
To github.com:<GitHub_username>/<GitHub_repo>.git
! [remote rejected] master -> master (push declined due to email privacy restrictions)
error: failed to push some refs to '[email protected]:<GitHub_username>/<GitHub_repo>.git'
To resolve this error if anyone else encounters: source git config --global user.email "no_reply email found in github account settings" git rebase -i git commit --amend --reset-author git rebase --continue
Eventually the push is working from Atom now.
Expected behavior:
Have the exact error message that git is throwing:
- remote: error: GH007: Your push would publish a private email address.
- ! [remote rejected] master -> master (push declined due to email privacy restrictions) error: failed to push some refs to '[email protected]:<GitHub_username>/<GitHub_repo>.git'
Actual behavior:
Push rejected
The tip of your current branch is behind its remote counterpart. Try pulling before pushing. To force push, hold cmd or ctrl while clicking.
Reproduces how often:
Always
Versions
Atom : 1.45.0 Electron: 4.2.7 Chrome : 69.0.3497.128 Node : 10.11.0
I think I saw a similar issue when I tried pushing a file too large for github (not realising that was a problem). Rather than report that problem I got the
Push rejected
The tip of your current branch is behind its remote counterpart. Try pulling before pushing.
To force push, hold cmd or ctrl while clicking.
response, which sent me off trying to figure out how my repo got corrupted.
Would be better if the error messages passed through to atom git integration were a more accurate reflection of the actual problem
It seems to be the default error message that's just shown regardless, I got it with the email privacy rejection mentioned above, as well as just now with github rejecting my push due to my personal access token not having the workflow scope.