How to find the Vagrant IP?

前端 未结 12 1293
余生分开走
余生分开走 2021-01-30 08:17

I have been developing an automated deployment using Capistrano and using Vagrant as my test virtual server.

The thing is, I need the IP of Vagrant to \"ssh

12条回答
  •  无人共我
    2021-01-30 08:59

    run:

    vagrant ssh-config > .ssh.config
    

    and then in 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'
    

提交回复
热议问题