使用maven-release-plugin和GitHub“你不能推送到git://github.com/...” [英] Using maven-release-plugin with GitHub "You can't push to git://github.com/..."

查看:168
本文介绍了使用maven-release-plugin和GitHub“你不能推送到git://github.com/...”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近有一个项目的源代码存储库从SourceForge切换到GitHub,我需要更新maven发布过程以进行匹配。我遵循此链接,以配置scm部分POM。 GitHub存储库此处显示。其他一切与使用SVN时相同(用于发布到 https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-4.MavenRepositories )。然后我调用:

Recently having switched source code repository for a project to GitHub from SourceForge I need to update the maven release process to match. I followed this link for configuring the "scm" section of the pom. The GitHub repository is shown here. Everything else is as it was when using SVN (for publishing to https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-4.MavenRepositories). So then I invoke

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的连接就是我看到的所有关于maven-release-plugin的示例,任何洞察力,为什么它不在这里工作,或者我可以看看,以找出原因。我可以使用我在这里登录的用户做一个git push到相同的URL。(GitHub有SSH密钥)。

Now a connection of "scm:git:git://github.com/{organization}/{project}.git" is what all examples I've seen for maven-release-plugin so would appreciate any insight in why it doesn't work here, or what I could look at to find out why. I can do a git push to the same URL using the user I'm logged on here as (GitHub has the SSH key).

我尝试交换scm连接/开发人员连接到HTTPS,然后得到用户名/密码提示,然后挂起(它更新GitHub回购与版本没有SNAPSHOT),但这就是全部。

I tried swapping the scm connection/developerConnection over to https and then get username/password prompted and it then hangs (it updates the GitHub repo with the version without SNAPSHOT) but that's all.

推荐答案

实际上,问题更多的是关于如何配置SCM部分的相关Web链接,所以我在此发布答案以防其他人访问此消息。连接/ developerConnection的形式应该是

Actually the problem was more of believing web links of how you should configure your SCM section, so I post the answer here in case anyone else hits this message. The connection/developerConnection should be of the form

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

这篇关于使用maven-release-plugin和GitHub“你不能推送到git://github.com/...”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆