From: paul h Date: 2011-06-12T23:05:27+09:00 Subject: Interacting with Git Hi all, I need to interact with Git via Ruby on my server and hope someone can point me in the right direction. This is the env I have: Paperless office (Windows boxes), using Git to back up files to the repo on my server (Centos 5) Back Office server application built with Rails manages customer information/emails/standard letters/todo lists etc Ruby 1.9.2 This is the problem I have: The Rails app needs to pull backed-up files from the Git repo into a private part of the server so that the Rails app can read/evaluate/ display files backed up from the office. Therefore, I need ruby to: git pull ... enter password wait for git to complete pulling files in hand control back to the Rails app to analyse the files and perform any back office processing as I see fit Obviously, I could just ssh into my server and pull the files myself, but that relies on me being around the office all the time, what I really need to do is: a) automate the process and, b) provide a function in the Rails app so that non-technical staff can press a button on a web page and begin the process (this part is simple if I can solve a), above) I've been through the Pickaxe book, and am going to look closer at PTY and the 'expect' method later today and see if I can figure it out with these, but I am self taught, not 'classically trained' , so I would imagine this may spawn a whole new branch of learning for me in regards to processes and subprocesses, which I need to learn anyhow, so would appreciate any pointers any of the ruby experts out there might be willing to provide. Thanks Paul