how to block false user name and email in commits

i want to block those commits in the server which has false user name and email.
The authentication is via ssh. It is currently posible for me to update the config and to something other than mine and still commit and push to central repo. The history now shows wrong information about committer.
Any ideas, how we can prevent this?

  • Squashing complete history before a certain tag
  • Easy way to migrate a single file between branches in git?
  • Remove directory from a Git repository, and from history, without deleting it from the local filesystem
  • No branches in SourceTree
  • Is Git’s “master” branch name more than just a name?
  • Ignoring all filetypes underneath a directory .gitignore
  • Merge two Git repositories and keep the master history
  • Git doesn't clone all branches on subsequent clones?
  • NodeJS. Child_process.spawn. Handle process' input prompt
  • Make it as if I had .gitattributes the whole time
  • Use git log to find differences between when originally branched and current
  • Using editorconfig within Git submodules
  • 2 Solutions collect form web for “how to block false user name and email in commits”

    You will need to associated the ssh key with an email and deny commits that have a different email.

    Emails and usernames can be spoofed.

    The best way would be to sign the commits with a gpg key.

    gpg --list-keys  
    git config --global user.signingkey 123ABC89  
    git commit -S
    Git Baby is a git and github fan, let's start git clone.