与 CircleCI 一起使用时 maven-release-plugin 出现问题



我正在尝试使用 maven-release-plugin 发布到 Nexus 发布存储库,当我在 PC 本地运行时,这工作正常。但是,当我在 circleci 的工作中配置相同的内容时,我收到以下错误。

[INFO] Executing: /bin/sh -c cd /home/circleci/repo && git commit --verbose -F /tmp/maven-scm-724046220.commit pom.xml
[INFO] Working directory: /home/circleci/repo
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.414 s
[INFO] Finished at: 2018-10-11T17:00:30Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project : Unable to commit files
[ERROR] Provider message:
[ERROR] The git-commit command failed.
[ERROR] Command output:
[ERROR] 
[ERROR] *** Please tell me who you are.
[ERROR] 
[ERROR] Run
[ERROR] 
[ERROR]   git config --global user.email "you@example.com"
[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 <(null)>) not allowed
[ERROR] 
[ERROR] -> [Help 1]
[ERROR]

我在我的pom中使用了下面的scm.xml(由于格式问题,我没有给xml(

<scm>
<connection>scm:git:git@bitbucket.org:organization/project.git</connection>
<url>scm:git:git@bitbucket.org:organization/project.git</url>
<developerConnection>scm:git:git@bitbucket.org:organization/project.git</developerConnection>
<tag>@{project.version}</tag>
</scm>

我正在使用以下命令调用我的工作 -

mvn release:clean release:prepare release:perform -DreleaseVersion=${BUILD_VERSION_NUM} -DupdateWorkingCopyVersions=false -Dtag=${VERSION_NUM}

任何建议,为什么 git-commit 命令在 circleci 中失败。我必须做的任何特定设置。

非常感谢, 苏吉特

如果您要拉取/推送到 GitHub 存储库,而该存储库不是 CircleCI 构建的当前存储库,则需要设置部署或用户密钥:https://circleci.com/docs/2.0/gh-bb-integration/#creating-a-github-user-key

最新更新