I am working to automate the task of 'git pull' from bit-bucket server to my godaddy shared hosting. I have installed Git on Godaddy server and able to 'git clone', 'git pull' etc from command line remotely. But now I want to write a PHP code to run 'git pull' directly from browser.
PHP function exec() can be used for this but git pull from bit-bucket requires a password. I searched a lot on internet but can not find how to provide password from PHP code.
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.
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): http://abhisheksachan.blogspot.in/2014/04/setting-up-godaddy-shared-hosting-with.html