maven - 在GitHub上使用 Maven 发布插件"你不能推到 git://github.com/...""

  显示原文与译文双语对照的内容

最近,我已经从SourceForge中为一个项目切换了源代码库,我需要更新 Maven 发布过程来匹配。 为了配置pom的部分,我遵循了这个链接( ) 。 GitHub存储库在这里显示为 其他一切都像在使用 SVN ( 用于发布到 https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-4.MavenRepositories ) 时一样。 所以我调用


mvn clean release:clean release:prepare release:perform



输出如下所示


[INFO] --- maven-release-plugin:2.1:prepare (default-cli) @ datanucleus-maven-parent ---


[INFO] Verifying that there are no local modifications...


[INFO] ignoring changes on: pom.xml.next, release.properties, pom.xml.releaseBackup, pom.xml.backup, pom.xml.branch, pom.xml.tag


[INFO] Executing:/bin/sh -c cd/home/andy/work/datanucleus/datanucleus-maven-parent && git status


[INFO] Working directory:/home/andy/work/datanucleus/datanucleus-maven-parent


[INFO] Checking dependencies and plugins for snapshots.. .


What is the release version for"DataNucleus Maven parent project"? (org.datanucleus:datanucleus-maven-parent) 3.3: : 


What is SCM release tag or label for"DataNucleus Maven parent project"? (org.datanucleus:datanucleus-maven-parent) datanucleus-maven-parent-3.3: : 


What is the new development version for"DataNucleus Maven parent project"? (org.datanucleus:datanucleus-maven-parent) 3.4-SNAPSHOT: : 


[INFO] Transforming 'DataNucleus Maven parent project'...


[INFO] Not generating release POMs


[INFO] Executing goals 'clean verify'...


[INFO] Executing:/bin/sh -c cd/home/andy/work/datanucleus/datanucleus-maven-parent &&/usr/local/maven3/bin/mvn clean verify --no-plugin-updates -Psonatype-oss-release -P development


 [WARNING] Command line option -npu is deprecated and will be removed in future Maven versions.


 [INFO] Scanning for projects...


 [INFO] 


 [INFO] ------------------------------------------------------------------------


 [INFO] Building DataNucleus Maven parent project 3.3


 [INFO] ------------------------------------------------------------------------


 [INFO] 


 [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ datanucleus-maven-parent ---


 [INFO] Deleting/home/andy/work/datanucleus/datanucleus-maven-parent (includes = [*.log], excludes = [])


 [INFO] 


 [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ datanucleus-maven-parent ---


 [INFO] 


 [INFO] --- maven-bundle-plugin:2.4.0:manifest (default) @ datanucleus-maven-parent ---


 [WARNING] Ignoring project type pom - supportedProjectTypes = [jar, bundle]


 [INFO] 


 [INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) @ datanucleus-maven-parent ---


 [INFO] 


 [INFO] --- maven-javadoc-plugin:2.7:jar (attach-javadocs) @ datanucleus-maven-parent ---


 [INFO] Not executing Javadoc as the project is not a Java classpath-capable package


 [INFO] 


 [INFO] --- maven-gpg-plugin:1.1:sign (sign-artifacts) @ datanucleus-maven-parent ---


 [INFO] ------------------------------------------------------------------------


 [INFO] BUILD SUCCESS


 [INFO] ------------------------------------------------------------------------


 [INFO] Total time: 1.535s


 [INFO] Finished at: Sat Dec 14 08:51:07 GMT 2013


 [INFO] Final Memory: 14M/491M


 [INFO] ------------------------------------------------------------------------


[INFO] Checking in modified POMs...


[INFO] Executing:/bin/sh -c cd/home/andy/work/datanucleus/datanucleus-maven-parent && git add -- pom.xml


[INFO] Working directory:/home/andy/work/datanucleus/datanucleus-maven-parent


[INFO] Executing:/bin/sh -c cd/home/andy/work/datanucleus/datanucleus-maven-parent && git status


[INFO] Working directory:/home/andy/work/datanucleus/datanucleus-maven-parent


[INFO] Executing:/bin/sh -c cd/home/andy/work/datanucleus/datanucleus-maven-parent && git commit --verbose -F/tmp/maven-scm-1907822841.commit pom.xml


[INFO] Working directory:/home/andy/work/datanucleus/datanucleus-maven-parent


[INFO] Executing:/bin/sh -c cd/home/andy/work/datanucleus/datanucleus-maven-parent && git symbolic-ref HEAD


[INFO] Working directory:/home/andy/work/datanucleus/datanucleus-maven-parent


[INFO] Executing:/bin/sh -c cd/home/andy/work/datanucleus/datanucleus-maven-parent && git push git://github.com/datanucleus/datanucleus-maven-parent.git master:master


[INFO] Working directory:/home/andy/work/datanucleus/datanucleus-maven-parent


[INFO] ------------------------------------------------------------------------


[INFO] BUILD FAILURE


[INFO] ------------------------------------------------------------------------


[INFO] Total time: 6.885s


[INFO] Finished at: Sat Dec 14 08:51:07 GMT 2013


[INFO] Final Memory: 15M/491M


[INFO] ------------------------------------------------------------------------


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project datanucleus-maven-parent: Unable to commit files


[ERROR] Provider message:


[ERROR] The git-push command failed.


[ERROR] Command output:


[ERROR] fatal: remote error:


[ERROR] You can't push to git://github.com/datanucleus/datanucleus-maven-parent.git


[ERROR] Use https://github.com/datanucleus/datanucleus-maven-parent.git



现在,"scm:git:git://github.com/{organization}/{project}.git"的连接是我所看到的所有示例,所以我会感谢它在这里无法工作。 我可以使用在这里登录的用户作为( GitHub拥有SSH密钥) 来对相同的URL执行 git push 。

我尝试将developerConnection连接/交换到 https,然后得到用户名/密码提示,然后它挂起( 它使用没有快照的版本更新GitHub的repo ),但这是所有的。

时间:

实际上问题是更多的信任web链接,如何配置SCM部分,因这里我在这里发布答案以防任何人碰到。 连接/developerConnection应该是表单


scm:git:git@github.com:{organization}/{project}.git



...