1

我正在使用 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 环境中工作。

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

[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>

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

4

0 回答 0