Capistrano 3 SSHKit::Runner::ExecuteError: Excepti

2019-04-18 04:35发布

I'm getting the following error while deploying my rails app to an ubuntu server, I have correctly setup ssh keys and I can ssh to the server but I'm getting the following when I try to do

 cap production deploy

This is the error message

cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host xxxxxx.xxxxxxx.xxx: agent could not sign data with requested identity

I can't figure out what I am doing wrong since I had previously deployed and I just need to update my app to changes I have made. I have not changed my deploy.rb, Capfile or deploy/production.rb files since I last deployed

4条回答
霸刀☆藐视天下
2楼-- · 2019-04-18 05:04

I had the same issue but in my case I had to delete file .ssh/known_hosts from my local machine.

查看更多
Anthone
3楼-- · 2019-04-18 05:09

I solved a similar issue by just issuing ssh-add. It seems that my current environment hasn't properly picked up the keys and readding them fixed the issue.

查看更多
等我变得足够好
4楼-- · 2019-04-18 05:20

I had the same error.

ssh-copy-id user@ipaddress

Helped me to solve this.

查看更多
兄弟一词,经得起流年.
5楼-- · 2019-04-18 05:26

After upgrading Rails from 4.1.x to 4.2, I started getting similar errors when trying to bundle. I fixed it by removing the shared bundle directory. Here's the steps I took:

  1. SHH into the server
  2. cd /my/app/shared/bundle/ruby
  3. rm -rf 2.1.0 or whatever "version" directory is there
  4. Re run the deploy cap production deploy

You may, at this point, hit a memory snag (I did while deploying to a DigitalOcean droplet). The fix for that is to create and enable a swap file on the droplet.

查看更多
登录 后发表回答