Capistrano asks for password when deploying, despite SSH keys

前端 未结 7 1768
-上瘾入骨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:31

    The logs show it prompted for a password after logging in via SSH to jellly.com, so it looks like the actual git update is prompting for a password.

    I think this is because your repository setting specifies your git user, even though you can access it anonymously in this case.

    You should create an anonymous git account and change your repo line like this:

    set :repository,  "git@jellly.com:git/jellly.git"
    

    Alternatively, you could put your SSH key ON your production server, but that doesn't sound useful. You also might be able to configure SSH to forward authentication requests back through the initial SSH connection. The anonymous read-only source control for deploy is likely easier, though.

提交回复
热议问题