Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/61.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Cap生产部署尝试与我的本地计算机用户连接_Ruby On Rails_Deployment_Capistrano_Digital Ocean - Fatal编程技术网

Ruby on rails Cap生产部署尝试与我的本地计算机用户连接

Ruby on rails Cap生产部署尝试与我的本地计算机用户连接,ruby-on-rails,deployment,capistrano,digital-ocean,Ruby On Rails,Deployment,Capistrano,Digital Ocean,这可能是我错过的一些简单的东西,但当我尝试部署时,我会 cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host 178.**.**.235: Authentication failed for user lwa@178.**.**.235 lwa@user是我mac上的用户,我似乎无法将其更改为为为服务器创建的用户。 有什么想法吗?显然,您需要配置一个SSH密钥-> 但是我们需要更多的信息,比如d

这可能是我错过的一些简单的东西,但当我尝试部署时,我会

cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 178.**.**.235: Authentication failed for user lwa@178.**.**.235
lwa@user是我mac上的用户,我似乎无法将其更改为为为服务器创建的用户。
有什么想法吗?

显然,您需要配置一个SSH密钥->


但是我们需要更多的信息,比如deploy.rb…

我需要将这一行放在deploy/production.rb文件中

server '***.***.***.***', user: 'rails', roles: %w{web app}

这解决了问题。

感谢您的回答,问题是,我已经创建了ssh密钥,可以在用户rails下正常连接。只有当我使用cap时,它才使用lwa@.