是否可以通过SSH对GitHub存储库使用Maven Release插件进行连接?
GitHub本身建议使用 HTTPS 进行存储库访问,我希望避免使用SSH密钥。您不需要SSH从命令行推送到存储库,那么为什么Maven Release插件会有任何不同之处?
最终这应该来自詹金斯。
我尝试在我的pom.xml中使用JGit:
<scm>
<connection>scm:git:https://github.com/me/myproject.git</connection>
<developerConnection>scm:git:https://github.com/me/myproject.git</developerConnection>
</scm>
...
<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>
<configuration>
<providerImplementations>
<git>jgit</git>
</providerImplementations>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-jgit</artifactId>
<version>1.9.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
...
执行发布目标会产生错误:
$ mvn release:prepare release:perform -Dresume=false -Dusername=gituser -Dpassword=gitpassword
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare (default-cli) on project myproject: An error is occurred in the checkin process:
Exception while executing SCM command. JGit checkin failure! https://gituser@github.com/me/myproject.git: https://gituser@github.com/me/myproject.git/info/refs?service=git-receive-pack not found -> [Help 1]
我错过了一些显而易见的事情,或者这是不可能的?