Details

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

      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. settings-publickey.xml
        0.8 kB
        kristian meier
      2. settings-login.xml
        0.8 kB
        kristian meier
      3. pom.scpexe.xml
        0.6 kB
        kristian meier
      4. pom.scp.xml
        0.6 kB
        kristian meier

        Activity

        kristian meier created issue -
        kristian meier made changes -
        Field Original Value New Value
        Attachment pom.scpexe.xml [ 29228 ]
        kristian meier made changes -
        Attachment settings-login.xml [ 29229 ]
        kristian meier made changes -
        Attachment settings-publickey.xml [ 29230 ]
        stephenconnolly made changes -
        Labels contributers-welcome
        Robert Scholte made changes -
        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

          


        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.
        {noformat}
        ===============================================================================

        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).
        {noformat}


        ====================
        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

          


        Mark Thomas made changes -
        Project Import Sun Apr 05 09:25:59 UTC 2015 [ 1428225959796 ]
        Mark Thomas made changes -
        Workflow jira [ 12719308 ] Default workflow, editable Closed status [ 12761428 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 23:00:37 UTC 2015 [ 1428274837609 ]
        Mark Thomas made changes -
        Workflow jira [ 12956785 ] Default workflow, editable Closed status [ 12993422 ]

          People

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

            Dates

            • Created:
              Updated:

              Development