Default private email for git operations #2962
Zarpyk opened 3 weeks ago

With admin account I think you can put directly unverified email like [email protected], but as user it require verified email to set it as Git email.

Github and Gitea allow user to set private emails as emails to commit (Gitea also allow set this option to true by default for all users)

Gitea:

imagen.png

Github:

imagen_2.png

  • Robin Shen commented 3 weeks ago

    OneDev needs to mark unverified email, as not doing so can impose security issues:

    1. User adds an unverified email of other staff (email not currently used in OneDev)
    2. User configures local git to use that email for commit authoring
    3. User configures PGP signing of the commit
    4. When the commit is pushed to OneDev, the commit is displayed as signed commit using that email to get trust.
  • Zarpyk commented 3 weeks ago

    Then it needs a separete option for private email. You configure the noreply domain in the admin settings, and it is automatically assigned to the user.

  • OneDev commented 2 weeks ago

    State changed as build OD-8064 is successful

  • OneDev changed state to 'Closed' 2 weeks ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen changed title 2 weeks ago
    Previous Value Current Value
    Default private email
    Default private email for git operations
  • Zarpyk commented 2 weeks ago

    Thinking about why gitea and github private email contain a number before the email address, I think it is the user ID (for example github ID can be check with the API: https://api.github.com/users/zarpyk and is the same number, on gitea I think I'm just the user number 1), so if you change the login name, other people can't get you noreply email.

    With the current implementation, if you change your login name, the noreply email become available for anyone that get your old login name? I don't know how GPG key works exactly.

  • Robin Shen commented 2 weeks ago

    OneDev intentionally does not prepend user id as that can lead to all git commits incorrectly associating with incorrect user if you import the repository into another OneDev instance (or other git hosting software such as Gitea) which may use different user id for same login.

    Changing login name can be a problem, and we should avoid changing login name in normal cases. I think this is a common limitation for many systems.

1/1
Type
New Feature
Priority
Major
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2962
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover