maven 发布插件 - wagon 因 ssh 身份验证失败,但 snapshort 和发布部署工作 - 嗯?
我很困惑,非常感谢任何帮助。我的构建机器无法再使用 Maven 发布插件。当我尝试在从标签部署期间进行身份验证时失败。但是,这台机器可以使用标准部署方法来快照和发布存储库(它们位于以 Nexus 作为中介的同一台机器上)。
- release:perform 在我的桌面上工作
- release:perform 在我的构建计算机上失败,并出现身份验证错误
- 部署到快照或发布存储库 在桌面和构建计算机上工作
- release:perform 在我的构建计算机上失败,并出现以下错误:
部署工件时出错:身份验证失败:无法连接。原因:身份验证取消
两台机器都是 Windows,我认为 ssh 没问题,因为快照和正常部署都可以工作。我看过以下内容,但没有运气。任何建议都将受到欢迎。谢谢
Peter
检查的东西
- setting.xml(相同)
- 路径(不同,但当我制作相同时没有影响)
- 本地存储库(尝试清除每个存储库以查看是否是它 - 没有影响)
- maven安装 - 相同
< strong>命令 - 通常由 hudson 运行,但也可以手动运行
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:clean clean --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:prepare --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 deploy --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:perform --batch-mode
POM
<groupId>com.releng.experiment</groupId>
<artifactId>simplejar</artifactId>
<packaging>jar</packaging>
<version>1.0.16-SNAPSHOT</version>
<name>simplejar</name>
<url>http://maven.apache.org</url>
...
<scm>
<url>http://svn-da/svn/darepos/users/pkahn/simplejar/trunk</url>
<developerConnection>scm:svn:http://svn-da/svn/darepos/users/pkahn/simplejar/trunk</developerConnection>
</scm>
<build>
<finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>daeng</id>
<name>DA Engineering</name>
<url>scp://mavenrepo/opt/sonatype-work/nexus/storage/daeng/</url>
</repository>
<snapshotRepository>
<id>daeng-snap</id>
<name>DA Engineering</name>
<url>scp://mavenrepo/opt/sonatype-work/nexus/storage/daeng-snap/</url>
</snapshotRepository>
</distributionManagement>
</project>
I'm baffled and would appreciate any help. My build machine can no longer use the maven release plugin. When I try it fails on auth during the deployment from the tag. However, this machine can release using the standard deploy method to snapshot and release repositories (which are on the same machine with nexus as intermediary).
- release:perform works from my desktop
- release:perform fails on my build machine with auth error
- deploy to a snapshot or release repository works from desktop and build machine
- release:perform fails from my build machine with the following:
Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth cancel
Both machines are windows and I presume ssh is OK because snapshot and normal deploy works. I have looked at the following with no luck. Any suggestions would be welcome. Thanks
Peter
Things Checked
- setting.xml (identical)
- Path (different, but no impact when I made identical)
- Local Repositories (tried clearing each to see if that was it - no impact)
- maven installations - same
Commands - usually run by hudson but run by hand as well
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:clean clean --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:prepare --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 deploy --batch-mode
mvn.bat -DdevelopmentVersion=1.0.16 -DreleaseVersion=1.0.15 -DscmCommentPrefix=SCM-1 release:perform --batch-mode
POM
<groupId>com.releng.experiment</groupId>
<artifactId>simplejar</artifactId>
<packaging>jar</packaging>
<version>1.0.16-SNAPSHOT</version>
<name>simplejar</name>
<url>http://maven.apache.org</url>
...
<scm>
<url>http://svn-da/svn/darepos/users/pkahn/simplejar/trunk</url>
<developerConnection>scm:svn:http://svn-da/svn/darepos/users/pkahn/simplejar/trunk</developerConnection>
</scm>
<build>
<finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>daeng</id>
<name>DA Engineering</name>
<url>scp://mavenrepo/opt/sonatype-work/nexus/storage/daeng/</url>
</repository>
<snapshotRepository>
<id>daeng-snap</id>
<name>DA Engineering</name>
<url>scp://mavenrepo/opt/sonatype-work/nexus/storage/daeng-snap/</url>
</snapshotRepository>
</distributionManagement>
</project>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一些建议/想法:
~/.ssh
目录known_hosts
文件-X
运行来看看是否获得更多有用的信息Some suggestions/ideas:
~/.ssh
directoryknown_hosts
file<version>2.0</version>
-X
to see if you get more useful information