Hi guys,
I am trying to add to my PHP cron script I have.
I want the cron to check a private repo on github.com to see if it has been updated since last download and then to download the master.zip, and then extract it over the top of the old code.
My first issue is how to get the PHP code to download the master.zip from a private repo.
Obviously:
file_put_contents("master.zip", file_get_contents("https://github.com/company/repo/archive/master.zip"));
is not going to work, as it is a private repo.
I did take a look at this https://github.com/markomarkovic/simple-php-git-deploy but was unable to get it to work as I have now idea how to create an SSH for a shared hosting account that PHP can use to contact GitHub.
So if anyone can help me get markomarkovic's code to work or has any other code suggestions or ideas please let me know
Cheers in advance!