Capistrano asks for password when deploying, despite SSH keys

前端 未结 7 1748
-上瘾入骨i
-上瘾入骨i 2020-12-22 23:14

My ssh keys are definitely set up correctly, as I\'m never prompted for the password when using ssh. But capistrano still asks for a password when deploying with cap d

7条回答
  •  一整个雨季
    2020-12-22 23:40

    If you're using a Windows workstation (portable) that you sometimes dock directly into an internal corporate network and sometimes connect via VPN, you may find that you get inconsistent behavior in running cap remote tasks asking you for a password.

    In my situation, our company has login scripts that execute when you logged in while already connected to the company LAN that set your HOME directory to a network share location. If you login from cached credentials and then VPN in, your home directory isn't set by the login script. The .ssh directory that stores your private key may be in only one of those locations.

    An easy fix in that situation is to just copy the .ssh directory from the HOME that has it to the one that doesn't.

提交回复
热议问题