Skip to content

Commit

Permalink
Move ssh agent forwarding setting to deploy.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
reyesyang committed Aug 5, 2015
1 parent c79af56 commit a7ea341
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions config/deploy.example.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
set :application, 'blog'
set :repo_url, "git@git-server:user/path-to-app.git"
set :user, 'webuser'
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }

set :ssh_options, {
user: fetch(:user),
forward_agent: true
}

set :repo_url, "git@git-server:user/path-to-app.git"
set :branch, 'master'

set :deploy_to, "/srv/www/#{fetch(:application)}"
Expand Down
10 changes: 5 additions & 5 deletions config/deploy/production.example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# it's possible to pass any option but you need to keep in mind that net/ssh understand limited list of options
# you can see them in [net/ssh documentation](http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start)
# set it globally
set :ssh_options, {
user: fetch(:user),
# port: 22, # overrides if your change ssh service port
forward_agent: true
}
# set :ssh_options, {
# user: fetch(:user),
# # port: 22, # overrides if your change ssh service port
# forward_agent: true
# }
# and/or per server
# server 'example.com',
# user: 'user_name',
Expand Down

0 comments on commit a7ea341

Please sign in to comment.