Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-180

Although a password is given in the settings.xml for a scp url, a password prompt still appears

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-beta-3
    • wagon-ssh
    • None
    • ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10

    Description

      I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.

      I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.

      If I replace the code in the method promptKeyboardInteractive, which was originally
      return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
      by
      String[] result = new String[prompt.length];
      result[0] = userInfo.getPassword();
      return result;
      (which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.

      I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              tfischer Thomas Fox
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: