capistrano3.4.0部署不能自动登录
2016-03-25 16:13
429 查看
部署的时候发现需要输入服务器密码,不能直接登录
3.0+版本config/deploy.rb 取消了user的写法
需要用这样的写法
https://github.com/capistrano/capistrano/blob/621985511529893d972e79452ad63eb54430fb4c/lib/capistrano/templates/stage.rb.erb
或者在deploy/production.rb里设置ssh用户名
DEBUG [ab5be9b4] Running /usr/bin/env [ -d $HOME/.rbenv/versions/2.3.0 ] on 10.103.xx.xx DEBUG [05871a47] Running /usr/bin/env [ -d $HOME/.rbenv/versions/2.3.0 ] on 10.103.xx.xx DEBUG [dd74890c] Running /usr/bin/env [ -d $HOME/.rbenv/versions/2.3.0 ] on 10.103.xx.xx DEBUG [ab5be9b4] Command: [ -d $HOME/.rbenv/versions/2.3.0 ] DEBUG [05871a47] Command: [ -d $HOME/.rbenv/versions/2.3.0 ] DEBUG [dd74890c] Command: [ -d $HOME/.rbenv/versions/2.3.0 ] Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text. root@10.103.xx.xx's password:Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text. root@10.103.xx.xx's password:Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text. root@10.103.xx.xx's password:
3.0+版本config/deploy.rb 取消了user的写法
set :user, 'webuser'
需要用这样的写法
set :ssh_options, { user: 'webuser' }
https://github.com/capistrano/capistrano/blob/621985511529893d972e79452ad63eb54430fb4c/lib/capistrano/templates/stage.rb.erb
或者在deploy/production.rb里设置ssh用户名
# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value # server 'db.example.com', user: 'deploy', roles: %w{db}
相关文章推荐
- 当CAD图形中无法进行复制、粘贴时,请将此DWG另存一下或许就可以了
- capistrano3.4.0部署不能自动登录
- StudyJams第一课的学习
- 关于整数和真分数的四则运算的算法,整数已通过,但真分数不能化到最简的问题求大神指导啊
- 做一个合格的程序猿之浅析Spring AOP源码(十七) Spring AOP开发大作战
- python笔记---常见异常
- io端口与io内存详解(zz)
- 图像识别工程师 VS The application has requested the Runtime to terminate it in an unusual way.
- iOS开发 ☞ UITableView详解
- iOS开发Swift篇(01) 变量&常量&元组
- 3.25课·········JavaScript简介与语法
- BCM_I2C函数更改
- 巧用 构造函数
- centos关闭selinux
- 华为招聘练习--小明的筷子
- Nginx源码编译安装
- 160多个android开源代码汇总
- Android之调用系统照相机并裁剪
- codeforces_616D. Longest k-Good Segment(尺取法)
- Linux安全学习总结