OiO.lk Blog PHP how to pull data from gitlab with php script in laravel?
PHP

how to pull data from gitlab with php script in laravel?


I create new project in gitlab.

I upload my project in host, I need get last update form gitlab with function in laravel.

My function:

function execPrint($command = "git pull user:pass@gitlab.com/myProject.git") {
    $result = array();
    exec($command, $result);
    print("<pre>");
    foreach ($result as $line) {
        print($line . "\n");
    }
    print("</pre>");
}

After run this function:

ssh: Could not resolve hostname shayvard: Temporary failure in name resolution
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How to issue this code?



You need to sign in to view this answers

Exit mobile version