Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Using CI3 to push to a Github repo

$
0
0
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?

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>