title: Automation of git pull using PHP code
body: <p>I am working to automate the task of <strong>'git pull'</strong> from bit-bucket server to my godaddy shared hosting. I have installed Git on Godaddy server and able to <strong>'git clone'</strong>, <strong>'git pull'</strong> etc from command line remotely. But now I want to write a PHP code to run 'git pull' directly from browser. </p>
  
  <p>PHP function <strong>exec()</strong> can be used for this but git pull from bit-bucket requires a password. I searched a lot on internet but can not find <strong>how to provide password from PHP code.</strong></p>
  
  <p>Note: I have tried setting up passwordless authentication between 2 server(Godaddy - Bitbucket), but it didn't work. So I am left with above method only.</p>
  
  <p>EDIT: I have completed the setup and now able to update the godaddy server with one click. However, the PHP code part didn't work for me due to restrictions on Godaddy's severs. So I have created a batch script for the same, a passwordless authentication to server and automated git pull command. Here are steps to do it (may be helpful for any one with similar problem): <a href="http://abhisheksachan.blogspot.in/2014/04/setting-up-godaddy-shared-hosting-with.html" rel="noreferrer">http://abhisheksachan.blogspot.in/2014/04/setting-up-godaddy-shared-hosting-with.html</a></p>