Uploaded image for project: 'Maven Deploy Plugin'
  1. Maven Deploy Plugin
  2. MDEPLOY-62

deploy on remote repository with linux

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.2.1
    • None
    • None

    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

      Attachments

        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

          People

            Unassigned Unassigned
            m.kristian kristian meier
            Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: