Merge pull request #8993 from glaubinix/t/git-driver-use-auth-support
GitDriver: use authentication for supports checkpull/8993/head^2
commit
cbdee533e3
|
@ -219,8 +219,17 @@ class GitDriver extends VcsDriver
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$process = new ProcessExecutor($io);
|
$gitUtil = new GitUtil($io, $config, new ProcessExecutor($io), new Filesystem());
|
||||||
|
GitUtil::cleanEnv();
|
||||||
|
|
||||||
return $process->execute('git ls-remote --heads ' . ProcessExecutor::escape($url), $output) === 0;
|
try {
|
||||||
|
$gitUtil->runCommand(function ($url) {
|
||||||
|
return 'git ls-remote --heads ' . ProcessExecutor::escape($url);
|
||||||
|
}, $url, null);
|
||||||
|
} catch (\RuntimeException $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue