How to Configure Jenkins for Git Merge?


  • I am using the functionality that automatically merge branch from Jenkins (Git Plugin and/or Validate Merge Plugin)
  • When doing the merge/push my build fail a stacktrace similar to:
 Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git merge qwertyuiopasdfghjklzxcvbnm" returned status code 128:
 *** Please tell me who you are.
 git config --global ""
 git config --global "Your Name"
 to set your account's default identity.
 Omit --global to set the identity only in this repository.
 fatal: empty ident <jenkins@localhost> not allowed



When doing a push, git needs user information to be able to push anything. This can be configured in Jenkins either Globally or per Project.

Global Configuration

In the global configuration under Manage Jenkins > Configure System > Git Plugin:

Project Configuration

In the project configuration, under Source Code Management > Git > Additional Behaviours, you can add the behaviour Custom user name/email address:

Validate Merge Access Control (For Validate Merge Plugin only)###

When using validate merge, you can specify which user/credentials to use for logging to the remote host. For example, you can use*Username/Password credentials and specify your GitHub API Token as password:

For more information, please have a look at Validate Merge Plugin - Pushing to the upstream repository

Have more questions?


Please sign in to leave a comment.