我正在尝试发布 mvn,但由于 git 的问题而失败。我之前已经多次这样做了,没有这个问题,我真的不明白为什么/如何发生这种情况。
我第一次得到它是在做 mvn release:prepare,但是通过将下面显示的最后一行添加到我的 root-pom 来解决它:
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>clean install</preparationGoals>
<pushChanges>false</pushChanges>
但是现在,当我尝试执行 mvn release:perform 时,我再次收到错误消息:
[INFO] Executing: cmd.exe /X /C "git clone file://C\Users\torbjornk\nfr\MyProject/ C:\Users\torbjornk\nfr\MyProject\target\checkout"
[INFO] Working directory: C:\Users\torbjornk\nfr\MyProject\target
[ERROR] The git-clone command failed.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to checkout from SCM
Provider message:
The git-clone command failed.
Command output:
fatal: 'C:/Program Files (x86)/Git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
我不明白我的 git-installation-folder 应该是一个 git 存储库的想法!在错误发生之前记录的 git clone-command 也不包含对此文件夹的引用。