October 22, 2024
Chicago 12, Melborne City, USA
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

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video