B
B
Bogopodoben2016-02-29 16:34:37
PHP
Bogopodoben, 2016-02-29 16:34:37

Why doesn't php webhook git work?

Good afternoon. The problem is that we need an auto deploy repository for the production site. I read it and decided to do everything through the webhook of the repository, and in the root of the site I hung an underscript that pulled changes from the repository.

<?php
system('git pull');
?>

I saw many different scripts, but none of them worked.
After pushing to the repository, the webhook writes that everything is ok. But nothing has changed on the site. Most likely the problem is in this script. Please tell me the option, or how to modify this one. Or the rights are closed what on a hosting?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
TyzhSysAdmin, 2016-02-29
@POS_troi

A beautiful solution to the problem is here https://gitlab.com/kpobococ/gitlab-webhook/tree/master :)

A
Alexey Romanenko, 2016-02-29
@slimus

when you run the script as a webserver user, run it manually and see what your script outputs. or log and then read the logs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question