Great, I'm chuffed you got it working in the end. Keys are the answer, really :-D or the password trick (which is intentionally a bit weird). Regarding those empty block things, yeah, if you don't need 'em, just comment them out. I thought you should be able to remove them completely, but then you might get missing task errors. If that happens you can just do:
namespace :whatever do task :a task :b end (define two noop tasks in namespace :whatever) ... it might be easier on the eyes? Lee Hambley -- http://lee.hambley.name/ +49 (0) 170 298 5667 On 9 December 2013 18:11, Vell <lovell.mcilw...@gmail.com> wrote: > Actually, my dialog with you has helped quite a bit. I was very close and > you helped me to get over the hump. > > I did decide to install my public key on the authorized keys on the > server. Its better then being prompted for my password 4 times during the > actual deployment. Once I changed the repo url from http:// to git:// > that eliminated the error I was getting about running git update-info on > the git server. As for the deploy name space blocks, I just commented out > the contents of each block since I don't need them and I was able to deploy > without any issues. The remote server has everything it should and I am in > the clear. > > I appreciate you talking me through it. > > On Monday, December 9, 2013 12:03:53 PM UTC-5, Lee Hambley wrote: > >> My blog doesn't specifically refer to Git, it builds a tarball from a >> local working copy, and conditionally uploads that. >> >> I'm surprised that you are having such problems. You might also try the >> password format like `user:password@host` - which should spare you the >> prompt, at least. (Authenticating with a password is also in the SSHKit >> README and EXAMPLES files. >> >> Lee Hambley >> -- >> http://lee.hambley.name/ >> +49 (0) 170 298 5667 >> >> >> On 9 December 2013 18:02, Vell <lovell....@gmail.com> wrote: >> >>> I actually like the versioning and rolling back but its not a must to >>> have. I will take a look at your blog and see if that fits a little bit >>> better. >>> >>> Thanks, >>> >>> >>> On Monday, December 9, 2013 11:59:46 AM UTC-5, Lee Hambley wrote: >>> >>>> Looking at your code, I'd assume the highlight password prompt is >>>> coming from Net::SSH itself, I have never seen that before, since I always >>>> use keys. >>>> >>>> https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md is a >>>> decent reference for "just running SSH commands" … if you don't need all >>>> the versioning/rollback/plugin hooks of Capistrano, just use Rake and >>>> SSHKit, see the article on my blog about doing that: >>>> http://lee.hambley.name/2013/06/11/using-capistrano-v3-with-chef.html >>>> >>>> Lee Hambley >>>> -- >>>> http://lee.hambley.name/ >>>> +49 (0) 170 298 5667 >>>> >>>> >>>> On 9 December 2013 17:53, Vell <lovell....@gmail.com> wrote: >>>> >>>>> Hmm it is possible that I don't either code blocks in the deploy >>>>> name space since all I care about is getting the code to the server and >>>>> not >>>>> to run any tasks aside from that. It looks like my issue now is with >>>>> running a git command on the remote server which I am unsure how to >>>>> address >>>>> at the moment and will have to look into it. >>>>> >>>>> >>>>> On Monday, December 9, 2013 11:43:03 AM UTC-5, Lee Hambley wrote: >>>>> >>>>>> Looks like `on roles(:web), in: :groups, limit: 3, wait: 10 do` is a >>>>>> problem, as you haven't put any servers in the `web` role. (I assume, >>>>>> having never tried it that the server() command, overwrites the role() >>>>>> command, you are meant to take one, or the other not both!) >>>>>> >>>>>> If you don't need an SSH key, or a password, I have no idea what'll >>>>>> happen. From the code you posted where the highlight password prompt is >>>>>> coming from. >>>>>> >>>>>> I wish I could be more help. >>>>>> >>>>>> Lee Hambley >>>>>> -- >>>>>> http://lee.hambley.name/ >>>>>> +49 (0) 170 298 5667 >>>>>> >>>>>> >>>>>> On 9 December 2013 17:38, Vell <lovell....@gmail.com> wrote: >>>>>> >>>>>>> Thanks for the response Lee. >>>>>>> >>>>>>> The server I am attempting to deploy to doesn't have an ssh-key on >>>>>>> it that allows me to authenticate without a password. It is only one >>>>>>> server >>>>>>> that I am deploying to in this case (another OS X system). This is why I >>>>>>> believe it prompted me for a password. I figured that if the other users >>>>>>> that attempt to deploy, don’t know the password to the server then I’m >>>>>>> fairly safe. It keeps me from having the task of adding users to the >>>>>>> authorized keys file on that server. However, there aren’t that >>>>>>> many users, so if I have to do it I will. >>>>>>> >>>>>>> Right now here is what I have in my files. Sorry for the entries >>>>>>> being ambiguous. >>>>>>> >>>>>>> deploy.rb >>>>>>> >>>>>>> set :application, 'my_sync' >>>>>>> set :repo_url, 'http://gitserv.domain.com/dba/my_sync' >>>>>>> >>>>>>> >>>>>>> # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } >>>>>>> >>>>>>> >>>>>>> set :deploy_to, '/users/administrator/scripts/my_sync' >>>>>>> set :scm, :git >>>>>>> >>>>>>> >>>>>>> # set :format, :pretty >>>>>>> # set :log_level, :debug >>>>>>> # set :pty, true >>>>>>> >>>>>>> >>>>>>> # set :linked_files, %w{config/database.yml} >>>>>>> # set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets >>>>>>> vendor/bundle public/system} >>>>>>> >>>>>>> >>>>>>> # set :default_env, { path: "/opt/ruby/bin:$PATH" } >>>>>>> set :keep_releases, 3 >>>>>>> >>>>>>> >>>>>>> namespace :deploy do >>>>>>> >>>>>>> >>>>>>> desc 'Restart application' >>>>>>> task :restart do >>>>>>> on roles(:app), in: :sequence, wait: 5 do >>>>>>> # Your restart mechanism here, for example: >>>>>>> # execute :touch, release_path.join('tmp/restart.txt') >>>>>>> end >>>>>>> end >>>>>>> >>>>>>> >>>>>>> after :restart, :clear_cache do >>>>>>> on roles(:web), in: :groups, limit: 3, wait: 10 do >>>>>>> # Here we can do anything such as: >>>>>>> # within release_path do >>>>>>> # execute :rake, 'cache:clear' >>>>>>> # end >>>>>>> end >>>>>>> end >>>>>>> >>>>>>> >>>>>>> after :finishing, 'deploy:cleanup' >>>>>>> >>>>>>> >>>>>>> end >>>>>>> >>>>>>> production.rb >>>>>>> >>>>>>> set :stage, :production >>>>>>> >>>>>>> role :app, %w{administra...@server.domain.com} >>>>>>> >>>>>>> server 'server.domain.com', user: 'administrator', roles: %w{app} #, >>>>>>> my_property: :my_value >>>>>>> >>>>>>> I figured this was pretty much all I needed. >>>>>>> >>>>>>> On Monday, December 9, 2013 3:59:15 AM UTC-5, Lee Hambley wrote: >>>>>>>> >>>>>>>> Hi Vell, >>>>>>>> >>>>>>>> If you are familiar with Cap2, then the fundamentals of Cap3 didn't >>>>>>>> change. >>>>>>>> >>>>>>>> Regarding your query, you look to be doing something non-standard >>>>>>>> (why is high line prompting for a password?) that's definitely nothing >>>>>>>> from >>>>>>>> us, and appears to be causing some problems. It would appear that one >>>>>>>> of >>>>>>>> your servers isn't authenticating problems (I realise that's a little >>>>>>>> bit >>>>>>>> unclear, but it's clearly failing in `net/ssh.rb:215:in `start'`) >>>>>>>> >>>>>>>> I'd say that you need to make sure your SSH keys are working >>>>>>>> correctly before starting with Capistrano! >>>>>>>> >>>>>>>> Good luck. >>>>>>>> >>>>>>>> On Sunday, 8 December 2013 22:59:43 UTC+1, Vell wrote: >>>>>>>>> >>>>>>>>> I looked at the readme and the http://www.capistranorb.co >>>>>>>>> m/documentation/getting-started/preparing-your-application. Its a >>>>>>>>> lot of explaining but nothing that explains what the bare minimum >>>>>>>>> is for deploying a ruby application. For instance, my application >>>>>>>>> doesn't >>>>>>>>> require the :web or :db part of the production application. So while >>>>>>>>> there >>>>>>>>> is "lots of stuff" there, there isn't something like the from >>>>>>>>> beginning >>>>>>>>> page that walks you through each part of the setup step by step to >>>>>>>>> understand what your doing and why your doing it. Well at least not >>>>>>>>> that I >>>>>>>>> have seen. >>>>>>>>> >>>>>>>>> Now I just need to understand why I am getting the following: >>>>>>>>> >>>>>>>>> afrosamurai:sync[capistrano]$ bundle exec cap production deploy >>>>>>>>> Text will be echoed in the clear. Please install the HighLine or >>>>>>>>> Termios libraries to suppress echoed text. >>>>>>>>> Password:********** >>>>>>>>> DEBUG Uploading /tmp/git-ssh.sh 0.0% >>>>>>>>> INFO Uploading /tmp/git-ssh.sh 100.0% >>>>>>>>> INFO [73e91495] Running /usr/bin/env chmod +x /tmp/git-ssh.sh on >>>>>>>>> enterprise.domain.com >>>>>>>>> DEBUG [73e91495] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh >>>>>>>>> INFO [73e91495] Finished in 0.347 seconds with exit status 0 ( >>>>>>>>> successful). >>>>>>>>> cap aborted! >>>>>>>>> administrator >>>>>>>>> /Users/vmcilwain/.rvm/gems/ruby-2.0.0-p247/gems/net-ssh-2.7.0/lib/ >>>>>>>>> net/ssh.rb:215:in `start' >>>>>>>>> /Users/vmcilwain/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.1.0 >>>>>>>>> /lib/sshkit/backends/netssh.rb:156:in `ssh' >>>>>>>>> /Users/vmcilwain/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.1.0 >>>>>>>>> /lib/sshkit/backends/netssh.rb:68:in `upload!' >>>>>>>>> /Users/vmcilwain/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/ >>>>>>>>> lib/capistrano/tasks/git.rake:11:in `block (3 levels) in <top >>>>>>>>> (required)>' >>>>>>>>> /Users/vmcilwain/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.1.0 >>>>>>>>> /lib/sshkit/backends/netssh.rb:42:in `instance_exec' >>>>>>>>> /Users/vmcilwain/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.1.0 >>>>>>>>> /lib/sshkit/backends/netssh.rb:42:in `run' >>>>>>>>> /Users/vmcilwain/.rvm/gems/ruby-2.0.0-p247/gems/sshkit-1.1.0/lib/ >>>>>>>>> sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' >>>>>>>>> Tasks: TOP => git:check => git:wrapper >>>>>>>>> (See full trace by running task with --trace) >>>>>>>>> >>>>>>>>> >>>>>>>>> On Sunday, December 8, 2013 4:01:11 PM UTC-5, Lee Hambley wrote: >>>>>>>>>> >>>>>>>>>> Lots of stuff on capistranorb.com! >>>>>>>>>> >>>>>>>>>> On Sunday, December 8, 2013, Vell wrote: >>>>>>>>>> >>>>>>>>>>> Versions: >>>>>>>>>>> >>>>>>>>>>> - Ruby 2.0.0-p247 >>>>>>>>>>> - Capistrano 3.0.1 >>>>>>>>>>> - Rake / Rails / etc (unsure about this question. its a >>>>>>>>>>> simple ruby application) >>>>>>>>>>> >>>>>>>>>>> Platform: >>>>>>>>>>> >>>>>>>>>>> - Working on.... Mac OS X 10.9 >>>>>>>>>>> - Deploying to... Mac OS X 10.7 >>>>>>>>>>> >>>>>>>>>>> Logs: >>>>>>>>>>> >>>>>>>>>>> - I don't have any logs as of yet >>>>>>>>>>> >>>>>>>>>>> Files: >>>>>>>>>>> >>>>>>>>>>> - Capfile >>>>>>>>>>> - deploy.rb >>>>>>>>>>> - Stage files (production.rb, staging.rb) >>>>>>>>>>> >>>>>>>>>>> I have used capistrano 2 to deploy rails apps. I have not had to >>>>>>>>>>> do that in a long time. I am trying to deploy a simple ruby >>>>>>>>>>> application >>>>>>>>>>> that I have created using the GLI gem but I can't seem to get a >>>>>>>>>>> handle on >>>>>>>>>>> the changes from capistrano 2 to capistrano 3. What happened me with >>>>>>>>>>> capistrano 2 when I first started using it was this page on the >>>>>>>>>>> capistrano >>>>>>>>>>> github wiki https://github.com/capistrano/ >>>>>>>>>>> capistrano/wiki/2.x-from-the-beginning . Is there a page like >>>>>>>>>>> this for capistrano 3? Something detailed and step by step that >>>>>>>>>>> will help >>>>>>>>>>> me understand things as I go along? >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> 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/07aa0218-f85d-4 >>>>>>>>>>> 69a-9f60-2544a7465401%40googlegroups.com. >>>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out >>>>>>>>>>> . >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Lee Hambley >>>>>>>>>> -- >>>>>>>>>> http://lee.hambley.name/ >>>>>>>>>> +49 (0) 170 298 5667 >>>>>>>>>> >>>>>>>>>> -- >>>>>>> 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+...@googlegroups.com. >>>>>>> To view this discussion on the web, visit >>>>>>> https://groups.google.com/d/msgid/capistrano/e1768e72-d141-4 >>>>>>> 165-99c4-099ce0c2e858%40googlegroups.com. >>>>>>> >>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>> >>>>>> >>>>>> -- >>>>> 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+...@googlegroups.com. >>>>> To view this discussion on the web, visit https://groups.google.com/d/ >>>>> msgid/capistrano/d44efdb9-d29d-4a68-a99d-4893cbbfd6f5%40googl >>>>> egroups.com. >>>>> >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> -- >>> 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+...@googlegroups.com. >>> To view this discussion on the web, visit https://groups.google.com/d/ >>> msgid/capistrano/3735f5d0-d43b-4d95-8e80-ce96ee60d1b3%40googlegroups.com >>> . >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- > 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/601e10ef-199c-4c5d-957f-fc113665f5ea%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- 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_%2BVLWc4GCR7esim%3DXD7U9zZ8pW4i5_otAb7PfQr5hSve-X9A%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.