{"repo":"capistrano/sshkit","free":true,"listed":false,"github":"https://github.com/capistrano/sshkit","clone":"git clone https://github.com/capistrano/sshkit.git","description":"A toolkit for deploying code and assets to servers in a repeatable, testable, reliable way.","language":"Ruby","stars":1219,"topics":["ssh","ruby","devops"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"SSHKit is a toolkit for running commands in a structured way on one or more servers. Example - Connect to 2 servers - Execute commands as deploy user with RAILS ENV=production - Execute commands in serial (default is :parallel ) Many other examples are in EXAMPLES.md. Basic usage The on() method is used to specify the backends on which you'd like to run the commands. You can pass one or more hosts as parameters; this runs commands via SSH. Alternatively you can pass :local to run commands locally. By default SSKit will run the commands on all hosts in parallel. Running commands All backends support the execute( args) , test( args) & capture( args) methods for executing a command. You can call any of these methods in the context of an on() block. Note: In SSHKit, the first parameter of the execute / test / capture methods has a special significance. If the first parameter isn't a Symbol, SSHKit assumes that you want to execute the raw command and the as / within / with methods, SSHKit.config.umask and the comand map have no effect. Typically, you would pass a Symbol for the command name and it's args as follows: By default the capture methods strips whitespace. If you need to preserve whitespace you can pass the strip: false option: capture(:ls, '-l', strip: false) Transferring files All backends also support the upload! and download! methods for transferring files. For the remote backend, the file is transferred with scp by default, but sftp is also supported. See EXAMPLES.md","default_branch":null,"files":null,"tree":[],"storefront":"/r/capistrano","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/capistrano/sshkit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}