【问题标题】:git clone project with large file freeze带有大文件冻结的 git clone 项目
【发布时间】:2017-09-05 00:05:03
【问题描述】:

我从 gitlab 服务器 git clone 一个项目,该项目有一个大约 90Mb 的大文件, git 命令将被冻结,我尝试了几次但得到相同的结果。冻结状态如下:

Cloning into 'GPU-HOOK'...
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (27/27), done.
Receiving objects:  24% (7/29), 41.99 MiB | 430.00 KiB/s

如何处理?

【问题讨论】:

  • 它会恢复吗? “冻结”是指“永远挂起”还是“需要很长时间”?如果是后者,多长?
  • 神经恢复
  • 试试SET GIT_CURL_VERBOSE=1SET GIT_TRACE=1,然后重新运行git命令,这会输出很多调试信息,看看你有没有发现什么可以解释的。

标签: git gitlab


【解决方案1】:

检查你的GitLab server configuration file (gitlab.yml)max_size的值:

  ## Git settings
  # CAUTION!
  # Use the default values unless you really know what you are doing
  git:
    bin_path: /usr/bin/git
    # The next value is the maximum memory size grit can use
    # Given in number of bytes per git object (e.g. a commit)
    # This value can be increased if you have very large commits
    max_size: 20971520 # 20.megabytes
    # Git timeout to read a commit, in seconds
    timeout: 10

您也可以在 Web 服务器前端(例如 NGiNX)中进行类似设置

但是,如果您使用的是 ssh url,那就没关系了。 Check instead your own local ssh config.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-10
    • 2021-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-13
    • 1970-01-01
    相关资源
    最近更新 更多