Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: None
    • Environment:
    • Number of attachments :
      4

      Description

      after I had again and again problems deploying on remote repositories on linux and after I colleague of mine also struggled with this, I did some testing. the tests I made on two machines and both produces the same results. I used both scp and scpexe as well login and public key authentication. this gives already quite a matrix. than I discovered that the behaviour is different if the private key has a passphrase or not. so I also include these two cases.

      the whole test just deploys a pom artifact on localhost in the tmp directory.

      so here are the results and some conclusions. the pom.xml and settings.xml I used are attached.

      ===============================================================================
      
      openssh server default config
      public-key: no passphrase, removed public-key and authorized_keys for login tests
      
      ===============================================================================
      
      
      mvn deploy -f pom.scp.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth fail
      
      mvn deploy -f pom.scpexe.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Error executing command for transfer
      
      Exit code 255 - Permission denied (publickey,keyboard-interactive).
      
      mvn deploy -f pom.scp.xml -s settings-publickey.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      mvn deploy -f pom.scpexe.xml -s settings-publickey.xml
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      
      
      ===============================================================================
      
      openssh server with "PasswordAuthentication yes"
      public-key: no passphrase, removed public-key and authorized_keys for login tests
      
      ===============================================================================
      
      
      mvn deploy -f pom.scp.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      mvn deploy -f pom.scpexe.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Error executing command for transfer
      
      Exit code 255 - Permission denied (publickey,password,keyboard-interactive).
      
      mvn deploy -f pom.scp.xml -s settings-publickey.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      mvn deploy -f pom.scpexe.xml -s settings-publickey.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      
      ===============================================================================
      
      openssh server with default config
      public-key: with passphrase, removed public-key and authorized_keys for login tests
      ===============================================================================
      
      
      mvn deploy -f pom.scp.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth fail
      
      mvn deploy -f pom.scpexe.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Error executing command for transfer
      
      Exit code 255 - Permission denied (publickey,keyboard-interactive).
      
      mvn deploy -f pom.scp.xml -s settings-publickey.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      mvn deploy -f pom.scpexe.xml -s settings-publickey.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Error executing command for transfer
      
      Exit code 255 - Permission denied (publickey,keyboard-interactive).
      
      
      ===============================================================================
      
      openssh server with "PasswordAuthentication yes"
      public-key: with passphrase, removed public-key and authorized_keys for login tests
      
      ===============================================================================
      
      mvn deploy -f pom.scp.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      mvn deploy -f pom.scpexe.xml -s settings-login.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Error executing command for transfer
      
      Exit code 255 - Permission denied (publickey,keyboard-interactive).
      
      mvn deploy -f pom.scp.xml -s settings-publickey.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      
      mvn deploy -f pom.scpexe.xml -s settings-publickey.xml 
      . . .
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error deploying artifact: Error executing command for transfer
      
      Exit code 255 - Permission denied (publickey,keyboard-interactive).
      

      ====================
      conclusions
      ====================

      • scpexe with username/password never worked
      • scpexe with public key works only when the private key has no passphrase, though the passphrase is given in settings.xml
      • login with username/password works only with scp against an ssh server with "PasswordAuthentication yes" configured
      • public key with scp works with any configuration
      • the two OS/java build/maven version machine behave exactly the same, so I
        conclude the problems lies somewhere within maven or the deploy plugin or
        the wagon ssh/sshexternal
      1. pom.scp.xml
        0.6 kB
        kristian meier
      2. pom.scpexe.xml
        0.6 kB
        kristian meier
      3. settings-login.xml
        0.8 kB
        kristian meier
      4. settings-publickey.xml
        0.8 kB
        kristian meier

        Activity

        Hide
        Jörg Hohwiller added a comment -

        > public key with scp works with any configuration
        does NOT work for me either. I am using maven-deploy-plugin version 2.3 and have a DSA key (.ssh/id_dsa).
        The key is perfectly accepted via openssh. However via maven the key is ignored and password is prompted.

        Show
        Jörg Hohwiller added a comment - > public key with scp works with any configuration does NOT work for me either. I am using maven-deploy-plugin version 2.3 and have a DSA key (.ssh/id_dsa). The key is perfectly accepted via openssh. However via maven the key is ignored and password is prompted.
        Hide
        Jörg Hohwiller added a comment -

        I already gave up with "mvn site:deploy" and am using "mvn site:stage" + rsync.
        Seems something like this is the best to do in this case right now.
        Hope this is going to be fixed some day...

        Show
        Jörg Hohwiller added a comment - I already gave up with "mvn site:deploy" and am using "mvn site:stage" + rsync. Seems something like this is the best to do in this case right now. Hope this is going to be fixed some day...
        Hide
        Stephen Connolly added a comment -

        Seems like a fruitful area for somebody wanting to contribute...

        I would start by taking the attached info and trying to create a test case from it. Could probably use Apache Mina's SSH server to see if a test case can be constructed that is OS independent.

        Show
        Stephen Connolly added a comment - Seems like a fruitful area for somebody wanting to contribute... I would start by taking the attached info and trying to create a test case from it. Could probably use Apache Mina's SSH server to see if a test case can be constructed that is OS independent.
        Hide
        Stephen Connolly added a comment -

        Could well be a WAGON issue and nothing to do with deploy plugin

        Show
        Stephen Connolly added a comment - Could well be a WAGON issue and nothing to do with deploy plugin

          People

          • Assignee:
            Unassigned
            Reporter:
            kristian meier
          • Votes:
            9 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated: