首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PackProtocolException:当使用jgitflow-maven-plugin使用jenkins作业时无效的广告

PackProtocolException:当使用jgitflow-maven-plugin使用jenkins作业时无效的广告
EN

Stack Overflow用户
提问于 2019-08-01 13:49:40
回答 1查看 391关注 0票数 0

我正在使用以下由亚特兰蒂斯团队创建并不再维护的jgitflow-maven-plugin。每当我试图在Jenkins作业中执行release时,我都会得到以下错误:

代码语言:javascript
复制
Caused by: org.eclipse.jgit.errors.PackProtocolException: invalid advertisement of <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

插件是这样导入的:

代码语言:javascript
复制
<plugin>
    <groupId>external.atlassian.jgitflow</groupId>
    <artifactId>jgitflow-maven-plugin</artifactId>
    <version>1.0-m5.1</version>
</plugin>

它在pom.xml中配置如下:

  1. SCM配置
代码语言:javascript
复制
<scm>
    <url>https://myOwnRepo.com/test</url>
    <connection>scm:git:https://myOwnRepo.com/test.git</connection>
    <developerConnection>scm:git:https://myOwnRepo.com/test.git</developerConnection>
    <tag>HEAD</tag>
</scm>
  1. 插件配置
代码语言:javascript
复制
<configuration>
    <flowInitContext>
        <masterBranchName>master</masterBranchName>
        <developBranchName>dev</developBranchName>
        <versionTagPrefix>v</versionTagPrefix>
    </flowInitContext>

    <pushFeatures>true</pushFeatures>
    <pushHotfixes>true</pushHotfixes>

    <username>myRepoUser</username>
    <password>myRepoPassword</password>

    <allowUntracked>true</allowUntracked>
</configuration>
  1. 其他配置
代码语言:javascript
复制
<executions>
    <execution>
        <id>release</id>

        <goals>
            <goal>release-start</goal>
            <goal>release-finish</goal>
        </goals>

        <configuration>
            <scmCommentPrefix>[RELEASE]</scmCommentPrefix>
        </configuration>
    </execution>

    <execution>
        <id>feature</id>

        <goals>
            <goal>feature-start</goal>
            <goal>feature-finish</goal>
        </goals>

        <configuration>
            <allowSnapshots>true</allowSnapshots>
            <scmCommentPrefix>[FEATURE]</scmCommentPrefix>
        </configuration>

    </execution>

    <execution>
        <id>hotfix</id>

        <goals>
            <goal>hotfix-start</goal>
            <goal>hotfix-finish</goal>
        </goals>

        <configuration>
            <scmCommentPrefix>[HOTFIX]</scmCommentPrefix>
        </configuration>

    </execution>
</executions>

我还尝试更改以下依赖项的版本:

代码语言:javascript
复制
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>

<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.sshagent</artifactId>

<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.jsch</artifactId>

<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.usocket-jna</artifactId>

该项目位于使用行参数设置的代理后面。它是按照scm的要求使用https克隆的。另外,为了连接,它使用的是令牌而不是密码。

在我的本地机器上,一切似乎都正常工作,与Jenkins作业的唯一区别似乎是所使用的代理。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-08-06 16:08:52

显然,导致jenkins作业错误行为的问题是代理(正如预期的那样)。

Jenkins实例运行在代理后面。当maven-jgitflow-plugin试图到达git时,它将得到403页作为回购的响应。

在更改代理后,这个错误消失了,插件也开始工作了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57310584

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档