Block command line pushes if they have the user's private email address
In https://gitlab.com/gitlab-org/gitlab-ce/issues/43521, we plan to add a setting to keep the user's commit email address private when performing any Git operations. The private commit email is automatically used when performing Git operations through the web interface. Also, the user can choose to change their local git-config email to the private commit email.
Proposal
- Add a setting to the user's profile to check if command line pushes to have the user's private email address
- If this setting is enabled, block pushes by the user that has the user's private email
- This setting is enabled by default if the user has chosen to have a private commit email
Git output should be something like:
remote: Error: push would publish your private email address (user@example.com)
remote:
remote: Learn more about Private Email Addresses <link to docs>
Links / references
Edited by Jeethu Karthik