美文网首页插件
git push/git clone代码速度太慢

git push/git clone代码速度太慢

作者: 禾子_____ | 来源:发表于2017-11-10 09:59 被阅读219次

For Mac

一、解决git push/git clone代码速度太慢:

1.使用管理员权限打开hosts文件

sudo vim /etc/hosts

2.在该文件末尾空一行填入

151.101.72.249 github.global.ssl.fastly.net

修改之后速度由10k20k左右增到500k-1000k左右

二、检出大项目报错,curl的postBuffer默认值太小:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining 
fatal: The remote end hung up unexpectedly 
fatal: early EOF 
fatal: index-pack failed

如果项目比较复杂庞大,检出会出现这个错误,就是因为curl的postBuffer默认值太小的原因,重新在终端配置一下这个值就可以:

git config --global http.postBuffer 524288000 (这个值是kb 500M,根据具体项目大小修改)

然后检查一下是否配置成功:

git config --list

相关文章

  • git push/git clone代码速度太慢

    For Mac 一、解决git push/git clone代码速度太慢: 1.使用管理员权限打开hosts文件 ...

  • 代码迁移(从git同步到码云)

    代码迁移 git clone --bare 以前git库地址 git init 码云地址 git push --m...

  • git clone 速度太慢

    windows修改host文件: C:\Windows\System32\drivers\etc\hostslin...

  • git clone速度太慢

    1. 此为暂时解决方案,目测替换后速度由4-10k提升到60-200k,依然龟速 2.带权限打开/etc/host...

  • Git迁移方法

    一、git clone --bare git push --mirror 1.git clone --bare g...

  • git命令

    git clone (git地址)git add .git commit -m ''git push origi...

  • git挪仓库

    拷贝原仓库代码 push 镜像代码 ***.git: 将旧有clone下来的项目push镜像到mirror里面 ...

  • git 版本回退

    git push 推送到远程仓库,发现大量代码错误处理方法 git clone 最新版本到本地 进入clone下来...

  • Git Bash使用随记

    clone 代码 git clone git@xxxxxx默认master分支 clone 指定分支代码 git ...

  • 2017.9.26

    git 复杂操作 git clone 地址 、//克隆仓库到本地 git push origin master ...

网友评论

    本文标题:git push/git clone代码速度太慢

    本文链接:https://www.haomeiwen.com/subject/bknvmxtx.html