Git克隆仅按一定百分比获取文件

时间:2019-04-20 04:54:05

标签: php laravel git

我正在尝试将GitHub存储库克隆到laravel中的主机上,如果我的存储库是轻量级的,它克隆就可以了,但是如果我的存储库不是轻量级,则只能克隆39%到44%,并且没有得到所有文件。

Tracks

Checking out files: 24% (125/502)
Checking out files: 25% (126/502)
Checking out files: 26% (131/502)
Checking out files: 27% (136/502)
Checking out files: 28% (141/502)
Checking out files: 29% (146/502)
Checking out files: 30% (151/502)
Checking out files: 31% (156/502)
Checking out files: 32% (161/502) 
Checking out files: 33% (166/502)
Checking out files: 34% (171/502)
Checking out files: 35% (176/502)
Checking out files: 36% (181/502)
Checking out files: 37% (186/502)
Checking out files: 37% (187/502)
Checking out files: 38% (191/502)
Checking out files: 39% (196/502)
Checking out files: 40% (201/502)
Checking out files: 41% (206/502)
Checking out files: 42% (211/502)
Checking out files: 43% (216/502)
Checking out files: 44% (221/502)

它停止了!

代码

$command1 = 'cd '.$destination.''; //like: public_html
$command2 = 'git clone '.$repos->repository.' '.$repos->name; //like: https://github.com/user_name/repo_name.git

$sshUser = $request->input('serverUser');
$sshPw = $request->input('server_ssh_password');
$ip = $request->input('server_ip');
$port = $request->input('port');
$ssh = new SSH2($ip, $port);
if (!$ssh->login($sshUser, $sshPw)) {
  $sshConnection ='Login Failed';
  Session::flash('danger', 'Login to your server failed, please check your credentials.');
  Log::info('SSH Login Failed '.$sshConnection.'');
  return redirect()->back();
} else {
  $sshConnection = $ssh->exec("$command1 && $command2");
}

文件

GitHub files

one

files cloned in my host

two

知道如何解决该问题吗?

0 个答案:

没有答案