K
K
karpo5182017-07-21 11:42:01
PHP
karpo518, 2017-07-21 11:42:01

How to push a commit to a remote git repository using PHP via SSH?

Please show a detailed code example (add, commit, push) without using third-party libraries.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Sanych, 2017-07-21
@mountpoint

I think you should just wrap the git commands in shell_exec(), but the www-data user should be writable to your working directory https://stackoverflow.com/a/8562666/4737276

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question