gpt4 book ai didi

gitlab: git clone https with large repos 失败

转载 作者:太空狗 更新时间:2023-10-29 13:11:08 24 4
gpt4 key购买 nike

当尝试通过 https 克隆大型存储库(~700MB)时,git 失败并显示:

c:\git-projects>git clone https://git.mycompany.de/fs.git
Cloning into 'fs'...
Username for 'https://git.mycompany.de': mwlo
Password for 'https://mwlo@git.mycompany.de':
efrror: RPC failed; result=22, HTTP code = 500
atal: The remote end hung up unexpectedly

通过 ssh 克隆工作:

c:\git-projects>git clone git@git.mycompany.de:fs.git
Cloning into 'fs'...
remote: Counting objects: 144564, done.
remote: Compressing objects: 100% (30842/30842), done.
remote: Total 144564 (delta 95360), reused 143746 (delta 94542)
Receiving objects: 100% (144564/144564), 601.34 MiB | 1.33 MiB/s, done.
Resolving deltas: 100% (95360/95360), done.
Checking out files: 100% (4649/4649), done.

使用 https 克隆较小的存储库也可以:

c:\git-projects>git clone https://git.mycompany.de/git-test.git
Cloning into 'git-test'...
remote: Counting objects: 135, done.
remote: Compressing objects: 100% (129/129), done.
remote: Total 135 (delta 68), reused 0 (delta 0)
Receiving objects: 100% (135/135), 18.77 KiB | 0 bytes/s, done.
Resolving deltas: 100% (68/68), done.

我已经调整了一些参数但没有成功:

/etc/nginx/nginx.conf
worker_processes 2; # have two cpu's
keepalive_timeout 120;
client_max_body_size 3072m;

/home/git/gitlab/config/gitlab.yml
## Git settings
# CAUTION!
# Use the default values unless you really know what you are doing
git:
bin_path: /usr/bin/git
# Max size of a git object (e.g. a commit), in bytes
# This value can be increased if you have very large commits
max_size: 3221225472 # 3072.megabytes
# Git timeout to read a commit, in seconds
timeout: 120

我们想使用 git clone https,因为 git 的 visual studio 工具还没有实现 ssh。

服务器上有两个进程,一段时间后CPU负载达到100%,然后进程终止。

git pack-objects --revs --all --stdout --progress --delta-base-offset 

问候,马可


System information
System: Debian 6.0.7
Current User: root
Using RVM: no
Ruby Version: 1.9.3p392
Gem Version: 1.8.23
Bundler Version:1.3.5
Rake Version: 10.0.4

GitLab information
Version: 5.3.0
Revision: 148eade
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: https://git.mycompany.de
HTTP Clone URL: https://git.mycompany.de/some-project.git
SSH Clone URL: git@git.mycompany.de:some-project.git
Using LDAP: yes
Using Omniauth: no

GitLab Shell
Version: 1.4.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git

最佳答案

这是在 issue 3079 中报告的: https 克隆需要 GitLab 服务器上的大量资源(CPU,但主要是内存),目前(GitLab 5.x)大型存储库。

即使是 GitLab 6.0 也带有 commits like 7ecebdd ,在克隆大型 存储库时提到超时。

不过,我还没有使用 GitLab 6 进行测试(应该明天发布)。

关于gitlab: git clone https with large repos 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17826660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com