Maven Wagon
  1. Maven Wagon
  2. WAGON-160

scp with password in settings.xml still asks password

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: wagon-ssh
    • Labels:
      None
    • Environment:
      java version "1.5.0_07"
      Maven version: 2.0.4
      Linux version 2.6.12-12mdk...(... (4.0.1-5mdk for Mandriva Linux release 2006.0)) #1 Fri Sep 9 18:15:22 CEST 2005
    • Number of attachments :
      1

      Description

      SCP deploy always asks me a password on the command line, ignoring the password in settings.xml.
      If I run with -B, no password is asked, but the process fails.
      If I don't use -B, I am asked for a password (five times for a single deploy operation).

      It looks as if the <password> tag in settings.xml were ignored. On the other hand, an ftp deploy reads the <password> and asks nothing on the command line.

      Google suggests that other people experienced the same problem:
      http://mail-archives.apache.org/mod_mbox/maven-users/200607.mbox/%3C44B5EBB6.7040707@microtec.fr%3E
      http://www.mail-archive.com/users@maven.apache.org/msg52463.html
      http://mail-archives.apache.org/mod_mbox/maven-users/200604.mbox/%3c443A39D3.5080806@systemone.at%3e
      But I could not find an answer to the problem, or an explanation of why all these people experienced the same difficulty.

      I guess it is just a matter of some complex configuration that would benefit from a clearer documentation....

        Issue Links

          Activity

          Hide
          Rogério Meneguelli Gatto added a comment -

          I have the same issue. My environment:

          Win XP Home, all patches applied
          Sun java version "1.5.0_09"
          Maven 2.0.4

          I worked around it by creating a shell script (with cygwin) and running it instead. It greps the appropriate password in settings.xml and feeds it through stdin to maven. You might have to tweek things a little bit to get it right, particularly the arguments to grep. Of course, you might just put the password in the script. Here it is:

          =====================================
          #!/bin/bash

          #chdir to pom.xml directory
          cd `dirname $0`/..

          PASSWORD=`grep -A 2 -F '<id>des01</id>' ~/.m2/settings.xml | tail -1 | cut -d'<' -f2 | cut -d'>' -f2`

          mvn site:site site:deploy <<END
          $PASSWORD
          END
          =====================================

          Show
          Rogério Meneguelli Gatto added a comment - I have the same issue. My environment: Win XP Home, all patches applied Sun java version "1.5.0_09" Maven 2.0.4 I worked around it by creating a shell script (with cygwin) and running it instead. It greps the appropriate password in settings.xml and feeds it through stdin to maven. You might have to tweek things a little bit to get it right, particularly the arguments to grep. Of course, you might just put the password in the script. Here it is: ===================================== #!/bin/bash #chdir to pom.xml directory cd `dirname $0`/.. PASSWORD=`grep -A 2 -F '<id>des01</id>' ~/.m2/settings.xml | tail -1 | cut -d'<' -f2 | cut -d'>' -f2` mvn site:site site:deploy <<END $PASSWORD END =====================================
          Hide
          Jon Osborn added a comment -

          FYI, changed the sshd_config setting

          PasswordAuthentication yes
          to fix the password prompting. The server is not allowing clear text passwords.

          Show
          Jon Osborn added a comment - FYI, changed the sshd_config setting PasswordAuthentication yes to fix the password prompting. The server is not allowing clear text passwords.

            People

            • Assignee:
              Brett Porter
              Reporter:
              Marco Ponzi
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: