新服务器 git clone php项目时报错
[root@10-10-5-60 php]# git clone http://xxx/xxx/php.git
Cloning into 'php'...
remote: Counting objects: 91687, done
remote: Finding sources: 100% (91687/91687)
error: RPC failed; result=18, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: protocol error: bad pack header

经查有如下两种方法
方法一:git config --global http.postBuffer 524288000
postBuffer 默认值较小的原因,需要进行以上配置

方法二:
git clone xxxx --depth 1 (本次使用该方法解决) 之后再git pull时不用再加--depth 1
git pull --depth 1(pull的时候可以使用)

相关文章:

  • 2021-08-11
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2022-12-23
  • 2021-07-22
  • 2021-08-10
  • 2018-10-11
  • 2021-11-29
  • 2021-11-05
相关资源
相似解决方案