Maven无法创建SSH连接

时间:2013-01-11 08:52:41

标签: java maven ssh cygwin

我在使用maven 2.2.1,尝试使用设置与存储库进行SSH连接:

<server>
                <id>my-repository-ssh</id>
                <username>username</username>
        <passphrase>mypassphrase</passphrase>
<privateKey>c:/Users/f.lastname/.ssh/id_rsa</privateKey>
   </server>

我在Cygwin环境中工作。

当我通过mvn clean install构建项目时,maven无法连接到存储库:

[INFO] artifact com.someworld:common.configuration: checking for updates from my-repository-ssh
Password for username@10.0.1.25:
[WARNING] repository metadata for: 'artifact com.someworld:common.configuration' could not be retrieved from repository: my-repository-ssh due to an error: Authentication failed: Cannot connect. Reason: Auth fail
[INFO] Repository 'my-repository-ssh' will be blacklisted

但是当我尝试通过sftp命令创建连接时,它很有用:

$ sftp username@10.0.1.25
Enter passphrase for key '/home/F.Lastname/.ssh/id_rsa':
Connected to 10.0.1.25.
sftp>

那么这个问题可能是什么原因?

0 个答案:

没有答案