将Capistrano安装为可播放的剧本时,找不到〜/ .ssh / id_rsa.pub错误 [英] ~/.ssh/id_rsa.pub not found error while installing capistrano as ansible playbook

查看:147
本文介绍了将Capistrano安装为可播放的剧本时,找不到〜/ .ssh / id_rsa.pub错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将 https://github.com/roots/bedrock-ansible 安装到运行基础部署( http://roots.io/wordpress-stack/ )。

I try to install https://github.com/roots/bedrock-ansible to get a bedrock deployment (http://roots.io/wordpress-stack/) running.

当我运行 vagrant up时,一段时间后出现错误:

When I run "vagrant up", after some time I get the error:

TASK: [capistrano-setup | Setup deploy group] ********************************* 
skipping: [default]

TASK: [capistrano-setup | Setup deploy user] ********************************** 
skipping: [default]

TASK: [capistrano-setup | Adding public key to server] ************************ 
fatal: [default] => could not locate file in lookup: ~/.ssh/id_rsa.pub

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/johannes/site.retry

default                    : ok=46   changed=16   unreachable=1    failed=0   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

我没有解决方法。您有想法吗?

I do not have a clou how i can fix this. Do you have an idea?

推荐答案

似乎该角色正在尝试查找您的本地公钥。它应该位于错误消息〜/ .ssh / id_rsa.pub中的位置,但不是。因此,要么没有一个密钥,要么将其保存在另一个位置。

It seems the role is trying to find your local public key. It should be in the location in the error message '~/.ssh/id_rsa.pub', but it's not. So either you don't have one, or you keep it in another location.

如果您不熟悉生成SSH密钥,则可能没有密钥。我个人喜欢GitHub帮助页面: https://help.github.com/ article / generating-ssh-keys /
(您只需执行步骤1和2)。

If you're not familiar with generating SSH keys you probably don't have one. I personally like the GitHub help page for this: https://help.github.com/articles/generating-ssh-keys/ (you only have to perform steps 1 and 2).

如果您有SSH密钥,但是在不同的位置,基岩中的capistrano-install角色使用一些变量:

If you do have SSH keys, but in a different location, the capistrano-install role in bedrock uses some variables:

deploy_user: deploy
deploy_keys:
  - "~/.ssh/id_rsa.pub"

因此您可以设置(多个) deploy_keys 列表中的公钥文件,它们将被添加到 deploy_user 的授权密钥中。

So you can set (multiple) public key files in the deploy_keys list and they will be added to the deploy_user's authorized keys.

这一切都是必需的,因为Capistrano稍后将使用部署用户连接到远程服务器。 http://blakesmith.me/2010/02 /08/understanding-public-key-private-key-concepts.html

All this is needed because Capistrano will use the deploy user to connect to the remote server later. http://blakesmith.me/2010/02/08/understanding-public-key-private-key-concepts.html

这篇关于将Capistrano安装为可播放的剧本时,找不到〜/ .ssh / id_rsa.pub错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆