Does anyone know how to push commits to a Github repo from inside CodeIgniter?
I have an upload form and once the file is uploaded I want to trigger:
git add -A
git commit -m "some message"
git push origin master
I have tried using this library: https://github.com/kbjr/Git.php
I split it into two classes and put then in /libraries and used $this->load->library()
to load them, but when I run a test with this:
$dir = base_url() . '/uploads';
$repo = Git::open($dir);
$repo->add('.');
$repo->commit('Some commit message');
$repo->push('origin', 'master');
I get the error: Message: "http://xxx.com/uploads/" does not exist
Any other ideas?
I have an upload form and once the file is uploaded I want to trigger:
git add -A
git commit -m "some message"
git push origin master
I have tried using this library: https://github.com/kbjr/Git.php
I split it into two classes and put then in /libraries and used $this->load->library()
to load them, but when I run a test with this:
$dir = base_url() . '/uploads';
$repo = Git::open($dir);
$repo->add('.');
$repo->commit('Some commit message');
$repo->push('origin', 'master');
I get the error: Message: "http://xxx.com/uploads/" does not exist
Any other ideas?