简体   繁体   English

无法标记 SCM Maven Release Jenkins Github

[英]Unable to tag SCM Maven Release Jenkins GitHUB

I am unable to generate using jenkins->maven-release->github我无法使用 jenkins->maven-release->github 生成

Jenkins Logs詹金斯日志

[INFO] Executing: /bin/sh -c cd /home/jenkins/jenkins_slave/workspace/SANDBOX-APP.RELEASE/parent && git push ssh://git@github.com/sloopsight-com/sandbox.git master:master
[INFO] Working directory: /home/jenkins/jenkins_slave/workspace/SANDBOX-APP.RELEASE/parent
[INFO] Tagging release with the label NPR1-0.0.1...
[INFO] Executing: /bin/sh -c cd /home/jenkins/jenkins_slave/workspace/SANDBOX-APP.RELEASE && git tag -F /tmp/maven-scm-1217902233.commit NPR1-0.0.1
[INFO] Working directory: /home/jenkins/jenkins_slave/workspace/SANDBOX-APP.RELEASE
[INFO] Executing: /bin/sh -c cd /home/jenkins/jenkins_slave/workspace/SANDBOX-APP.RELEASE && git push **ssh://git@github.com/sloopsight-com** NPR1-0.0.1
[INFO] Working directory: /home/jenkins/jenkins_slave/workspace/SANDBOX-APP.RELEASE
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] sandbox ............................................ FAILURE [ 45.334 s]
[INFO] sandbox-ui ......................................... SKIPPED
[INFO] sandbox-app ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46.521 s
[INFO] Finished at: 2020-11-06T21:32:37+05:30
[INFO] Final Memory: 25M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project sandbox-parent: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] ERROR: Repository not found.
[ERROR] fatal: Could not read from remote repository.
[ERROR] 
[ERROR] Please make sure you have the correct access rights
[ERROR] and the repository exists.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I am wondering why jenkins or maven release plugin change my git repo URL.我想知道为什么 jenkins 或 maven 发布插件会更改我的 git repo URL。 If you all can see in above logs URL is ssh://git@github.com/sloopsight-com/sandbox.git And it is pushing at ssh://git@github.com/sloopsight-com如果你们都可以在上面的日志中看到 URL 是ssh://git@github.com/sloopsight-com/sandbox.git它正在推送ssh://git@github.com/sloopsight-com

End up saying, please make sure you have the correct access rights and the repository exists.最后说,请确保您拥有正确的访问权限并且存储库存在。 But it is actually pushing at wrong URL.但它实际上是在错误的 URL 上推送。

Please help me out...请帮帮我...

Release plugin发布插件

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <tagNameFormat>NPR1-@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>

SCM TAG单片机标签


    <scm>
        <url>${GIT_URL}</url>
        <connection>scm:git:ssh://git@github.com/sloopsight-com/sandbox.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/sloopsight-com/sandbox.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

我通过将父 pom 移动到项目根目录来解决它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM