0

My client allocates a linux server without root access and git installed. I would like to pull my codes from github using a php script.

I googled this issue for last few hours. But no solution found.

Is there any way to do so?

6
  • Why not install git though? I presume cPanel provides a git way too. Commented Jan 22, 2021 at 7:38
  • @nice_dev This is a VPS and have no cpanel. Commented Jan 22, 2021 at 7:41
  • 1
    Fetch https://github.com/VND/PKG/archive/master.zip with copy() and do some unzipping. Commented Jan 22, 2021 at 7:41
  • @s.k.paul mario suggested a good way. An alternative is to do git pull on your machine and use sftp to push it, however this would take longer time if project is huge. Commented Jan 22, 2021 at 7:44
  • GitHub provides the ability to download your repo as a zip file. So you could do that and then unzip it. Don't need PHP for that, standard command line tools can do it Commented Jan 22, 2021 at 8:36

1 Answer 1

2

So i guess you need to use github REST Api. Github REST

Sign up to request clarification or add additional context in comments.

1 Comment

I've had a look on the docs. But not found anything alternative to git pull

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.