I get the following error while running gitflow command, e.g. gitflow:release-start
with ssh-agent defined as follows in Jenkinsfile
node {
sshagent (credentials: ['deploy-dev']) {
sh 'mvn gitflow:release-start'
}
}
[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.18.0:release-start (default-cli) on project testing:
[ERROR] *** Please tell me who you are.
[ERROR]
[ERROR] Run
[ERROR]
[ERROR] git config --global user.email "[email protected]"
[ERROR] git config --global user.name "Your Name"
[ERROR]
[ERROR] to set your account's default identity.
[ERROR] Omit --global to set the identity only in this repository.
[ERROR]
[ERROR] fatal: empty ident name (for <****@<hashcode>f.(none)>) not allowed
[ERROR] -> [Help 1]
Unfortunately setting user email and name can not be considered as solution in my case.
The problem is that your git configuration on the node is incomplete (probably not existing).
The message thrown gives already the answer. You must configure
user.email
anduser.name
in the git config of the node.You could either do this by ssh onto your node and run:
or do this as a
sh
command within theJenkinsfile
(before themvn
step). You might consider dropping--global
in this case.To check the current config, just run.