Git problems with Maven runner: release:prepare with Docker wrapper

During the release:prepare step I'm encountering a problem with committing to git. I'm using the Maven runner with the goal: release:prepare. As show in the attached screenshot, I'm using a Maven Docker image (maven:3.8.5-openjdk-18) but I'm not sure if this is the right way to go about this. 

 

The error during this build step is below:

[Step 4/9] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project idmsync: Unable to commit files
[19:02:21][Step 4/9] [ERROR] Provider message:
[19:02:21][Step 4/9] [ERROR] The git-commit command failed.
[19:02:21][Step 4/9] [ERROR] Command output:
[19:02:21][Step 4/9] [ERROR]
[19:02:21][Step 4/9] [ERROR] *** Please tell me who you are.
[19:02:21][Step 4/9] [ERROR]
[19:02:21][Step 4/9] [ERROR] Run
[19:02:21][Step 4/9] [ERROR]
[19:02:21][Step 4/9] [ERROR] git config --global user.email "you@example.com"
[19:02:21][Step 4/9] [ERROR] git config --global user.name "Your Name"
[19:02:21][Step 4/9] [ERROR]
[19:02:21][Step 4/9] [ERROR] to set your account's default identity.
[19:02:21][Step 4/9] [ERROR] Omit --global to set the identity only in this repository.
[19:02:21][Step 4/9] [ERROR]
[19:02:21][Step 4/9] [ERROR] fatal: unable to auto-detect email address (got 'root@1d0fbfbb49d2.(none)')
 
As far as I have been able to find out while searching a lot on the internet, is that this might be related to using an SSH key, but without having configured username and email in git. I'm not sure if this is the case, since I can't really figure out what git configuration the Docker container is using or how to communicate from TC to the container. 

I'm hoping to find a way to build some of our projects in a Docker container running newer version of Java, like version 17, 18 and such, since our Java build agent is configured to build legacy projects using older versions of Java. Installing newer versions of Java on the agent is simply too risky.
0

Please sign in to leave a comment.