我正在使用 Atlassian 团队的以下 jgitflow-maven-plugin(创建但不再维护)。每当我尝试从 Jenkins 作业中执行发布启动时,我都会收到以下错误:
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">
插件是这样导入的:
<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>1.0-m5.1</version>
</plugin>
在 pom.xml 中配置如下:
- 单片机配置
<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>
- 插件配置
<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>
- 其他配置
<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>
我还尝试更改以下依赖项的版本:
<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 工作的唯一区别似乎是使用的代理。