~/.ssh/id_rsa.pub 在将 capistrano 安装为 ansible playbook 时未发现错误 [英] ~/.ssh/id_rsa.pub not found error while installing capistrano as ansible playbook
问题描述
我尝试安装 https://github.com/roots/bedrock-ansible 到运行基础部署 (http://roots.io/wordpress-stack/).>
当我运行vagrant up"时,一段时间后出现错误:
任务:[capistrano-setup |设置部署组] *************************************跳过:[默认]任务:[capistrano-setup |设置部署用户] ************************************跳过:[默认]任务:[capistrano-setup |将公钥添加到服务器] ************************致命的:[默认] =>无法在查找中找到文件:~/.ssh/id_rsa.pub致命:所有主机都已经失败——正在中止播放回顾 ************************************************************************要重试,请使用:--limit @/Users/johannes/site.retry默认值:ok=46 已更改=16 无法访问=1 失败=0Ansible 未能成功完成.任何错误输出都应该是上面可见.请修复这些错误,然后重试.
我不知道如何解决这个问题.你有什么想法吗?
似乎该角色正在尝试查找您的本地公钥.它应该在错误消息~/.ssh/id_rsa.pub"中的位置,但事实并非如此.所以要么你没有,要么你把它放在另一个地方.
如果您不熟悉生成 SSH 密钥,您可能没有.我个人喜欢 GitHub 帮助页面:https://help.github.com/文章/生成-ssh-keys/(您只需执行步骤 1 和 2).
如果您有 SSH 密钥,但位于不同的位置,则基岩中的 capistrano-install 角色会使用一些变量:
deploy_user:部署部署密钥:- "~/.ssh/id_rsa.pub"
因此您可以在 deploy_keys
列表中设置(多个)公钥文件,它们将被添加到 deploy_user
的授权密钥中.
所有这些都是必需的,因为 Capistrano 稍后将使用部署用户连接到远程服务器.http://blakesmith.me/2010/02/08/understanding-public-key-private-key-concepts.html
I try to install https://github.com/roots/bedrock-ansible to get a bedrock deployment (http://roots.io/wordpress-stack/) running.
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?
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.
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).
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"
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.
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
这篇关于~/.ssh/id_rsa.pub 在将 capistrano 安装为 ansible playbook 时未发现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!