mbarkhau/bumpver

[Error] Email privacy settings on GitHub not allowing BumpVer commits.

definite-d opened this issue · 2 comments

Good day,

I tried a BumpVer update (BumpVer version 2023.1129), and this was the output (sans the name of the repo, which is redacted):

INFO    - fetching tags from remote (to turn off use: -n / --no-fetch)
INFO    - Latest version from VCS tag: 3.0.1
INFO    - Working dir version        : 3.0.1
INFO    - Old Version: 3.0.1
INFO    - New Version: 3.0.2
INFO    - git commit --message 'New 3.0.2 update from 3.0.1'
INFO    - git tag --annotate 3.0.2 --message '3.0.2'
INFO    - git push origin --follow-tags 3.0.2 HEAD
ERROR   - Error running subcommand: ['git', 'push', 'origin', '--follow-tags', '3.0.2', 'HEAD']
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
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 [redacted by me]
   3bd333d..5a2ba0c  HEAD -> dev
 * [new tag]         3.0.2 -> 3.0.2
 ! [remote rejected] 2.3.12 -> 2.3.12 (push declined due to email privacy restrictions)
 ! [remote rejected] 2.3.13 -> 2.3.13 (push declined due to email privacy restrictions)
error: failed to push some refs to '[redacted by me]'

The confusing thing is, my email settings for Git on the same PC already use private emails (both for just that project and globally), and I'm able to perform Git pushes manually with no issue. However, when I let BumpVer do it itself, it gives that error. I'm fully aware that I have email privacy turned on on my GH account and simply turning it off would make the error go away, but turning it off is not an option for me.

The only thing I can think that is causing this is that the commit includes your email. Is there anything particular you usually do to set the email associated with the commit?

I apologize in saying that I had "private" emails set for the project and globally; what I meant was I have public emails set up, so the issue shouldn't have been happening. The public email is [redacted], confirmed when I run git config --get user.email.

It's a config setting for Git, and I simply had it set via the command line and forgot about it.

Also, I'm sorry; the issue itself seems to have been some sort of corruption with the local Git repo I had, and not with BumpVer itself; BumpVer seems to simply use subprocess or os.system to run the command, and thus couldn't have been at fault. Since I was still able to push with regular git push, the GitHub repo was updated, so I fixed it by essentially backing up my project files and cloning the GitHub repo locally all over again. Quite a peculiar error.

Thank you for your concern though, and once again I apologize for my error.