Re: [capistrano-mailing-list] ssh user should be set to user running the cap command

2015-02-16 Thread Lee Hambley
Hi Chad, if you want to execute it using the user of the machine, you can
probably do that using `~/.ssh/config` (so only put the machine hostnames
in the capistrano config, and set the username on the user's ssh config)

Alternatively Ruby has an API to get the current username of the person
running the script, you could interpolate this into the hostname:
http://ruby-doc.org/stdlib-1.9.3/libdoc/etc/rdoc/Etc.html#method-c-getlogin


Lee Hambley
http://lee.hambley.name/
+49 (0) 170 298 5667

On 15 February 2015 at 18:49, Chippy S cmsbal...@gmail.com wrote:

 Versions:

- Ruby 1.9.3p448 (Centos 6 / SCL)
- Capistrano - 3.2.1
- Rake / Rails / etc

 Platform:

- Working on CentOS 6
- Deploying to... Windows

 Logs:

- Please past logs (as completely as possible to a 3rd party pasting
service such as pastie.org)

 Files:

- Capfile
- deploy.rb
- Stage files (production.rb, staging.rb)



 Myself and my co-workers all have our own accounts on both the deployment
 server (where we run 'cap production deploy') and on the servers we are
 deploying too. Yes we really are using cap to deploy apps to Windows boxes
 which run cygwin.  I realize that the docs suggest using a dedicated
 account, but that is not our setup.  Someone before me set all this up,
 using cap 2 and I'm now trying to do it with cap 3.  Due to our AD rules,
 using a dedicated account is not possible.

 What I want cap to do is use the username of the user executing the
 command, and that username will have the necessary permissions to do
 everything on both the deployment server and on the servers being pushed
 too.  I can get things working if I hard code the username to mine in
 config/deploy/production.rb and set it in the ssh_options.  But that won't
 work for my teammates.

 Any help much appreciated.

 Thank you,
 Chad



  --
 You received this message because you are subscribed to the Google Groups
 Capistrano group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to capistrano+unsubscr...@googlegroups.com.
 To view this discussion on the web, visit
 https://groups.google.com/d/msgid/capistrano/5f0470a5-015e-436e-ad09-11bad97c2d15%40googlegroups.com
 https://groups.google.com/d/msgid/capistrano/5f0470a5-015e-436e-ad09-11bad97c2d15%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Capistrano group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLWMY35kAVY46asfA30qxwLfPPG-O6r-BDBH-%3D5cTNCxmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[capistrano-mailing-list] ssh user should be set to user running the cap command

2015-02-15 Thread Chippy S
Versions:

   - Ruby 1.9.3p448 (Centos 6 / SCL)
   - Capistrano - 3.2.1
   - Rake / Rails / etc

Platform:

   - Working on CentOS 6
   - Deploying to... Windows

Logs:

   - Please past logs (as completely as possible to a 3rd party pasting 
   service such as pastie.org)

Files:

   - Capfile
   - deploy.rb
   - Stage files (production.rb, staging.rb)



Myself and my co-workers all have our own accounts on both the deployment 
server (where we run 'cap production deploy') and on the servers we are 
deploying too. Yes we really are using cap to deploy apps to Windows boxes 
which run cygwin.  I realize that the docs suggest using a dedicated 
account, but that is not our setup.  Someone before me set all this up, 
using cap 2 and I'm now trying to do it with cap 3.  Due to our AD rules, 
using a dedicated account is not possible.

What I want cap to do is use the username of the user executing the 
command, and that username will have the necessary permissions to do 
everything on both the deployment server and on the servers being pushed 
too.  I can get things working if I hard code the username to mine in 
config/deploy/production.rb and set it in the ssh_options.  But that won't 
work for my teammates.

Any help much appreciated.

Thank you,
Chad



-- 
You received this message because you are subscribed to the Google Groups 
Capistrano group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/5f0470a5-015e-436e-ad09-11bad97c2d15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.