<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,7 +10,24 @@ Capistrano::Configuration.instance.load do
   set :git_enable_submodules, 1
 
   #allow deploys w/o having git installed locally
-  set(:real_revision) { capture(&quot;git ls-remote #{repository} #{branch} | cut -f 1&quot;) }
+  set(:real_revision) do
+    output = &quot;&quot;
+    invoke_command(&quot;git ls-remote #{repository} #{branch} | cut -f 1&quot;, :once =&gt; true) do |ch, stream, data|
+      case stream
+      when :out
+        if data =~ /\(yes\/no\)\?/ # first time connecting via ssh, add to known_hosts?
+          ch.send_data &quot;yes\n&quot;
+        elsif data =~ /Warning/
+        elsif data =~ /yes/
+          #
+        else
+          output &lt;&lt; data
+        end
+      when :err then warn &quot;[err :: #{ch[:server]}] #{data}&quot;
+      end
+    end
+    output.gsub(/\\/, '').chomp
+  end
   #no need for system, log, and pids directory
   set :shared_children, %w()
 
@@ -20,6 +37,7 @@ Capistrano::Configuration.instance.load do
 
   before &quot;deploy:setup&quot;, &quot;puppet:initial_setup&quot;
   before &quot;deploy:setup&quot;, &quot;setup:users&quot;
+  after &quot;deploy:setup&quot;, &quot;setup:fix_permissions&quot;
 
   namespace :deploy do
     desc &quot;Override deploy restart to not do anything&quot;
@@ -61,6 +79,7 @@ Capistrano::Configuration.instance.load do
 
     task :generate_ssh_keys do
       run &quot;mkdir -p /home/wordpress/.ssh&quot;
+      run &quot;chmod 700 /home/wordpress/.ssh&quot;
       run &quot;ssh-keygen -q -f /home/wordpress/.ssh/id_rsa -N ''&quot;
       pubkey = capture(&quot;cat /home/wordpress/.ssh/id_rsa.pub&quot;)
       puts &quot;Below is a freshly generated SSH public key for your server.&quot;
@@ -86,6 +105,10 @@ Capistrano::Configuration.instance.load do
         puts &quot;Not resetting password, none provided&quot;
       end
     end
+
+    task :fix_permissions do
+      sudo &quot;chown -R #{user}:wheel #{deploy_to}&quot;
+    end
   end
 
   namespace :apache do</diff>
      <filename>config/deploy/wordpress.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>045539400448bd5c4bc5c6b33bec05359a0ee3e9</id>
    </parent>
  </parents>
  <author>
    <name>Jesse Newland</name>
    <email>jnewland@gmail.com</email>
  </author>
  <url>http://github.com/jestro/wordpress-capistrano/commit/827c9366c6133c338f417e17ac5cf21d5d3a79a5</url>
  <id>827c9366c6133c338f417e17ac5cf21d5d3a79a5</id>
  <committed-date>2008-11-24T11:55:16-08:00</committed-date>
  <authored-date>2008-11-24T11:55:16-08:00</authored-date>
  <message>fix windows hack, permissions fix</message>
  <tree>4e4b09b9fd30541b06c15f5238224a561aa552e6</tree>
  <committer>
    <name>Jesse Newland</name>
    <email>jnewland@gmail.com</email>
  </committer>
</commit>
