OK, for posterity, here's the solution...
The user in the pom URL is not necessary (and may be ignored for all I
know). Instead the user and key information are taken from the
settings,xml.
*However* the documentation in "How do I deploy my jar in my remote
repository?" (getting started guids) is a little misleading (perhaps only
if you are me) in that the "default value" they give is actually illegal
as Maven does *not* expand the tilde to the home directory. And instead
of giving an error because the private key is not found and attempt is
made with password authentication.
In other words use:
<settings>
.
.
<servers>
<server>
<id>mycompany-repository</id>
<username>jvanzyl</username>
<!-- Default value is ~/.ssh/id_dsa -->
<privateKey>/path/to/identity</privateKey> (default is ~/.ssh/id_dsa)
<passphrase>my_key_passphrase</passphrase>
</server>
</servers>
.
.
</settings>
but don't use a literal value for privateKey of "~/.ssh/id_dsa". Instead,
either leave it blank or give the full path (/home/user...).
Andrew
andrew cooke wrote:
>
> Hi,
>
> I have certificates and accounts configured so that sftp works without a
> password:
>
> [EMAIL PROTECTED] > sftp [EMAIL PROTECTED]
> Connecting to ctioyn.ctio.noao.edu...
> sftp>
>
> However, if I configure Maven with
>
> <repositories>
> <repository>
> <id>edu-noao-repository</id>
> <name>The NOAO Maven Repository</name>
> <url>sftp://[EMAIL PROTECTED]/.m2</url>
> </repository>
> </repositories>
>
> I am prompted for a password. Why? And how can I avoid this?
>
> Project ID: edu.noao.jboss:javax.ejb
>
> Reason: Error getting POM for 'edu.noao.jboss:javax.ejb' from the
> repository: Authentication failed: Cannot connect. Reason: Auth fail
> edu.noao.jboss:javax.ejb:EJB-3.0_RC1:pom
>
> from the specified remote repositories:
> edu-noao-repository (sftp://ctioyn.ctio.noao.edu/.m2),
> central (http://repo1.maven.org/maven2)
>
> Thanks,
> Andrew
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]