maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <org.apache.maven.u...@io7m.com>
Subject Re: NullPointerException in SSH wagon
Date Wed, 24 Apr 2013 22:20:01 GMT
On Wed, 24 Apr 2013 12:19:28 -0500
Curtis Rueden <ctrueden@wisc.edu> wrote:

> Hi Mark,
> 
> > The problem is that wagon-ssh seems more or less undocumented, and
> > so there's no indication that it supports keys loaded into OpenSSH's
> > ssh-agent. We exclusively use public keys for security reasons.
> 
> A quick Google search [1] suggested that you can use the <privateKey>
> element of settings.xml [2]. I didn't try it, but it sounds promising.
> Would that solve it for you?

'Lo.

I've been playing around with it and although jsch won't talk to my
ssh-agent, I can at least specify the password for the key (and avoid
saving the passphrase in plain, via
http://maven.apache.org/guides/mini/guide-encryption.html).

Essentially:

<settings>
  <servers>
    <server>
      <id>example-scp-server</id>
      <username>someone</username>
      <privateKey>/home/someone/.ssh/id_rsa</privateKey>
      <passphrase>{encrypted password here, between braces}</passphrase>
    </server>
  </servers>
</settings>

And then, when deploying, the server ID above is specified via the
repositoryID:

mvn gpg:sign-and-deploy-file       \
  "-DpomFile=pom.xml"              \
  "-Dfile=${NAME}.jar"             \
  "-Dfiles=..."                    \
  "-Dclassifiers=..."              \
  "-Dtypes=..."                    \
  "-Durl=scp://example.com/repos"  \
  "-DrepositoryId=example-scp-server"

It's a bit strange, but it does work.

Thanks!
M

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message