问题描述
当试图通过https克隆一个大型回购(〜700MB)时,git将失败:
c:\ git -projects> git clone https://git.mycompany.de/fs.git
克隆到'fs'...
'https://git.mycompany.de'的用户名:mwlo
密码为'https://[email protected]':
efrror:RPC失败;结果= 22,HTTP代码= 500
atal:远端意外挂断
克隆通过ssh工作:
c:\ git-projects> git clone [email protected]:fs.git
克隆到'fs'...
remote:计数对象:144564,完成。
remote:压缩对象:100%(30842/30842),完成。
remote:合计144564(delta 95360),重复使用143746(delta 94542)
接收对象:100%(144564/144564),601.34 MiB | 1.33 MiB / s,完成。
解析三角洲:完成100%(95360/95360)。
检出文件:100%(4649/4649),完成。
使用https克隆较小的存储库也可以:
c:\ git-projects> git clone https://git.mycompany.de/git-test.git
克隆到'git-test'中...
remote:计数对象:135,完成。
remote:压缩对象:100%(129/129),完成。
remote:总计135(delta 68),重用0(delta 0)
接收对象:100%(135/135),18.77 KiB | 0字节/秒,完成。
解决三角洲问题:完成100%(68/68)。
我已经调整了一些参数,但没有成功:
/etc/nginx/nginx.conf
worker_processes 2; #有两个cpu的
keepalive_timeout 120;
client_max_body_size 3072m;
/home/git/gitlab/config/gitlab.yml
## Git设置
#注意!
#使用默认值,除非你真的知道你在做什么
git:
bin_path:/ usr / bin / git
#一个git对象的最大尺寸),以字节为单位
#如果您有非常大的提交,可以增加此值
max_size:3221225472#3072.megabytes
#读取提交的Git超时,以秒为单位
超时:120
我们想使用git clone https,因为git的visual studio工具还没有执行ssh。
在服务器上有两个进程,CPU负载在一段时间后变为100%,然后进程终止。
git pack-objects --revs --all --stdout --progress --delta-base-offset
问候,马可
系统信息
系统:Debian 6.0.7
当前用户:root
使用RVM:no
Ruby版本:1.9.3p392
Gem版本: 1.8.23
Bundler Ve rsion:1.3.5
Rake版本:10.0.4
GitLab信息
版本:5.3.0
版本:148eade
目录:/ home / git / gitlab
数据库适配器:mysql2
URL:https://git.mycompany.de
HTTP克隆URL:https://git.mycompany.de/some-project.git
SSH克隆URL:[email protected]:some-project.git
使用LDAP:是
使用Omniauth:no
GitLab Shell
版本:1.4.0
存储库:/ home / git / repositories /
挂钩:/ home / git / gitlab-shell / hooks /
Git:/ usr / bin / git
这在:https克隆需要GitLab服务器上大量的资源(CPU,但主要是内存),目前(GitLab 5。 x)大型回购。
即使GitLab 6.0附带,在克隆 large 回购时提及超时。
尽管(这个应该会在明天发布),但是使用GitLab 6进行测试。
When trying to clone a large repo (~700MB) over https, git fails with:
c:\git-projects>git clone https://git.mycompany.de/fs.git
Cloning into 'fs'...
Username for 'https://git.mycompany.de': mwlo
Password for 'https://[email protected]':
efrror: RPC failed; result=22, HTTP code = 500
atal: The remote end hung up unexpectedly
clone over ssh works:
c:\git-projects>git clone [email protected]: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.
Cloning smaller repositories with https also works:
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.
I have already tweaked some parameters but without success:
/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
We would like to use git clone https, as the visual studio tools for git still not have implemented ssh.
On the server are two processes, CPU load goes to 100% after a while, then the processes are terminated.
git pack-objects --revs --all --stdout --progress --delta-base-offset
Regards, Marco
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: [email protected]: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
This is reported in issue 3079: https cloning requires a large amount of resources (CPU, but mainly memory) on the GitLab server, and currently (GitLab 5.x) large repos.
Even GitLab 6.0 comes with commits like 7ecebdd, mentioning timeouts when cloning large repo.
I haven't tested with GitLab 6, though (which should release tomorrow).
这篇关于gitlab:大回购git clone https失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!