如何找到流浪者IP? [英] How to find the Vagrant IP?
本文介绍了如何找到流浪者IP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在使用Capistrano开发自动化部署,并使用Vagrant作为测试虚拟服务器。
I have been developing an automated deployment using Capistrano and using Vagrant as my test virtual server.
问题是,我需要Vagrant的IP为 ssh
放入其中。
The thing is, I need the IP of Vagrant to "ssh
into it".
我尝试了 ifconfig
并获得了IP,但似乎不是确切的无业游民IP。
I tried ifconfig
and got the IP but it looks like it is not the exact vagrant IP.
有人可以帮助我获得无业游民IP吗?
Can anybody help me to get the Vagrant IP?
推荐答案
运行:
vagrant ssh-config > .ssh.config
,然后在 config / deploy.rb
role :web, "default"
role :app, "default"
set :use_sudo, true
set :user, 'root'
set :run_method, :sudo
# Must be set for the password prompt from git to work
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
ssh_options[:config] = '.ssh.config'
这篇关于如何找到流浪者IP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文