[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-user
Subject:    Not the usual "authenticity can't be established" post.
From:       Rob Moser <Rob.Moser () nau ! edu>
Date:       2014-10-29 22:21:47
Message-ID: 1414621307816-5811605.post () n5 ! nabble ! com
[Download RAW message or body]

I'm trying to use the deploy goal to upload a built library to our local
repository.  I get the message:

The authenticity of host 'FQDN' can't be established.

followed by a request for a password, despite the fact that I should be
using a private key to authenticate.  I googled round and found about 1,000
people getting the same message, and in every case someone has explained
about ~/.ssh/known_hosts and it's solved their problem... but that doesn't
seem to be _my_ problem.  I have that host in my known_hosts file, and I can
ssh in directly without receiving that message.  Unless maven is looking in
the wrong place for my known_hosts file, which would be weird.  So I
apologise if this is answered elsewhere in the archives - I couldn't find it
above the noise of people with the same symptoms, but apparently a different
problem.

Some background.  I'm using Maven 3.05 on a kubuntu 14.04 machine.  My
~/.m2/settings.xml file looks like:

<settings xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <servers>
    <server>
      <id>NAUMavenRepos</id>
      <username>maven-p</username>
      <privateKey>/home/rob/.ssh/id_rsa</privateKey>
      <filePermissions>644</filePermissions>
      <directoryPermissions>755</directoryPermissions>
    </server>
  </servers>
</settings>

That is indeed the location of my private key.  The corresponding public key
has been added to /home/maven-p/.ssh/authorized_keys2 on the host specified
('FQDN', in my obviously-doctored error message above.  Yes, I have
double-checked that FQDN is exactly the same in all of the places I've
subbed that in.)  I can ssh to the repository host as the user maven-p, and
I require no password, nor do I receive any message about being unable to
authenticate the host.  I can confirm that the host is in my known_hosts
file with ssh-keygen -F FQDN -f ~/.ssh/known_hosts.

The project I'm trying to deploy has a long and convoluted pom.xml file, but
the relevant distributionManagement section looks like:

       <distributionManagement>
                <repository>
                        <id>NAUMavenRepos</id>
                       
<url>scp://FQDN/home/maven-p/public_html/repository</url>
                </repository>
        </distributionManagement>

When I run mvn with the deploy goal (and the debug flag on) I get a ton of
output, but the relevant bits seem to be:

Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: /usr/local/lib/jdk1.7.0_25/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-37-generic", arch: "amd64", family:
"unix"
...
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for
scp://FQDN/home/usr3/maven-p/public_html/repository as maven-p
Uploading:
scp://FQDN/home/maven-p/public_html/repository/edu/nau/scan/NatTrack/1.1.3/NatTrack-1.1.3.jar
 The authenticity of host 'FQDN' can't be established.
RSA key fingerprint is a3:67:ef:52:ee:ad:11:c4:8e:7a:b1:8c:43:58:10:1a.
Are you sure you want to continue connecting? (yes/no):
Uploading:
scp://FQDN/home/maven-p/public_html/repository/edu/nau/scan/NatTrack/1.1.3/NatTrack-1.1.3.pom
 [INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 8:37.194s
[INFO] Finished at: Wed Oct 29 15:13:47 MST 2014
[INFO] Final Memory: 18M/239M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on
project NatTrack: Failed to deploy artifacts: Could not transfer artifact
edu.nau.scan:NatTrack:jar:1.1.3 from/to NAUMavenRepos
(scp://FQDN/home/maven-p/public_html/repository): Cannot connect. Reason:
Session.connect: java.net.SocketException: Broken pipe -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
(default-deploy) on project NatTrack: Failed to deploy artifacts: Could not
transfer artifact edu.nau.scan:NatTrack:jar:1.1.3 from/to NAUMavenRepos
(scp://FQDN/home/maven-p/public_html/repository): Cannot connect. Reason:
Session.connect: java.net.SocketException: Broken pipe

If I've trimmed anything you particularly wanted to see, just let me know;
trying to avoid unnecessarily flooding everyone's inbox.

Its as if the WagonRepositoryConnector is using a different known_hosts file
than my usual one.



--
View this message in context: \
http://maven.40175.n5.nabble.com/Not-the-usual-authenticity-can-t-be-established-post-tp5811605.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic