How to deploy over SCP with private key using Maven

前端 未结 1 1790
半阙折子戏
半阙折子戏 2021-01-28 06:56

Using Maven on windows, transfer over SCP, using a private key. It seems to be a very simple and documented process. But it didn\'t work for me.

In the settings.xml

相关标签:
1条回答
  • 2021-01-28 07:46

    Read/Write Privileges should be set correctly

    # Current directory should not be writable by others (and preferably not by group either):
    chmod o-w ~
    
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/id_rsa
    
    # Only in case id_rsa.pub exists (644 also ok):
    chmod 640 ~/.ssh/id_rsa.pub
    chmod 640 ~/.ssh/authorized_keys
    

    Ownership should be set correctly

    Set to current user and default group. By omitting the group after the colon, you make sure the group is reset to the default for that user.

    chown ${USER}: ~
    chown -R ${USER}: ~/.ssh
    
    0 讨论(0)
提交回复
热议问题