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