发布期间maven-scm-provider-jgit出现“auth fail”错误:准备好

时间:2015-09-12 20:01:00

标签: maven maven-release-plugin jgit maven-scm

我在没有安装git命令行的Windows机器上。我已经安装了GitExtensions和EGit,这对我来说已经足够了(直到现在)。

现在我想按照本指南对BinTray执行maven发布: Publishing releases using Github, Bintray and maven-release-plugin

运行:

mvn -Prelease release:prepare

生成此输出:

[INFO] ------------------------------------------------------------------------
[INFO] Building xxxxx 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.4.1:prepare (default-cli) @ xxxxx ---
[INFO] Resuming release from phase 'scm-commit-release'
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "git add -- pom.xml"
[INFO] Working directory: C:\Users\jbr\git\yyyyyyyyyyyyyyy
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.770 s
[INFO] Finished at: 2015-09-12T20:17:24+02:00
[INFO] Final Memory: 20M/989M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project xxxxx: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-add command failed.
[ERROR] Command output:
[ERROR] 'git' is not recognized as an internal or external command,
[ERROR] operable program or batch file.

绝对公平,我从不使用windows shell中的git命令,我从不设置pageant.exe的东西。 (有关详细信息,请参阅this answer to the question “Why git can't remember my passphrase under Windows”)。

我的第二个想法是使用maven-scm-provider-jgit不依赖于git命令行。

输出现在是:

[INFO] ------------------------------------------------------------------------
[INFO] Building xxxxx 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.4.1:prepare (default-cli) @ xxxxx ---
[INFO] Change the default 'git' provider implementation to 'jgit'.
[INFO] Resuming release from phase 'scm-commit-release'
[INFO] Checking in modified POMs...
[INFO] push changes to remote... refs/heads/master:refs/heads/master
[INFO] fetch url: git@github.com:jmini/yyyyyyyyyyyyyyy.git
[INFO] push url: git@github.com:jmini/yyyyyyyyyyyyyyy.git
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project xxxxx: An error is occurred in the checkin process: Exception while executing SCM command. JGit checkin failure! git@github.com:jmini/yyyyyyyyyyyyyyy.git: Auth fail -> [Help 1] 

好多了,但还是没有运气。

我的猜测是没有加载私钥和密码。我该如何配置它们?

This answer表明,对于某些SCM提供商,可以在<servers>的{​​{1}}部分中指定凭据。存储库的域名应该用作settings.xml。 根据{{​​1}}中使用<id>的最后一条评论,此条目适用于scm:git:ssh://git@bitbucket.org/{account}/{project}

<developerConnection>

这个构造是否受JGit SCM提供程序支持?

当搜索“Auth failed”错误时,我发现了这个相关的问题(普通的JGit,没有maven插件):

How do you set the configuration for jschconfigsessionfactory for jgit so that pull and push work?

0 个答案:

没有答案