我在Mac OS X 10.9.2中有一个GitLab服务器(6.7.2),带有git 1.9.2.有两个存储库.一个可以成功克隆,但另一个失败了
$ git clone http://*/gamil/gamil.git
Cloning into 'gamil'...
remote: Counting objects: 426, done.
remote: Compressing objects: 100% (375/375), done.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
我检查unicorn.stderr.log了GitLab并找到了
I, [2014-04-21T23:03:58.761225 #4929] INFO -- : master process ready
I, [2014-04-21T23:03:58.764556 #4940] INFO -- : worker=0 ready
I, [2014-04-21T23:03:58.766098 #4941] INFO -- : worker=1 ready
error: git-upload-pack died of signal 13
Run Code Online (Sandbox Code Playgroud)
这个错误来自什么?怎么解决?提前致谢!
编辑1:
我检查了存储库:
$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (426/426), done.
Run Code Online (Sandbox Code Playgroud)
所以似乎一切都很好,但无法克隆到本地计算机.
编辑2:
我已经将GitLab更新为6.8而没有运气.
编辑3:
我可以通过sshprotocol` 克隆有问题的存储库
$ git clone dongli@<...>:gamil
Cloning into 'gamil'...
remote: Counting objects: 426, done.
remote: Compressing objects: 100% (317/317), done.
remote: Total 426 (delta 89), reused 426 (delta 89)
Receiving objects: 100% (426/426), 821.19 KiB | 0 bytes/s, done.
Resolving deltas: 100% (89/89), done.
Checking connectivity... done.
Run Code Online (Sandbox Code Playgroud)
编辑4:
我检查了超时unicorn.rb:
# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 300
Run Code Online (Sandbox Code Playgroud)
和配置nginx:
# if a file, which is not found in the root folder is requested,
# then the proxy pass the request to the upsteam (gitlab unicorn)
location @gitlab {
proxy_read_timeout 300; # Some requests take more than 30 seconds.
proxy_connect_timeout 300; # Some requests take more than 30 seconds.
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://gitlab;
}
Run Code Online (Sandbox Code Playgroud)
编辑5
我已将存储库上传到GitHub,克隆是正常的:
$ git clone https://github.com/dongli/GAMIL.git 1
Cloning into '1'...
remote: Counting objects: 355, done.
remote: Compressing objects: 100% (308/308), done.
remote: Total 355 (delta 35), reused 355 (delta 35)
Receiving objects: 100% (355/355), 809.75 KiB | 244.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
Checking connectivity... done.
Run Code Online (Sandbox Code Playgroud)
所以存储库很好.
/var/log/nginx/gitlab_error.log我终于通过查看内部抱怨找到了问题的原因
2014/04/27 17:25:21 [crit] 14331#0: *19 open()
"/usr/local/var/run/nginx/proxy_temp/3/00/0000000003" failed (13: Permission denied)
while reading upstream, client: 123.113.33.131, server: *, request:
"POST /gamil/gamil.git/git-upload-pack HTTP/1.1",
upstream: "http://unix:/Users/git/gitlab/tmp/sockets/gitlab.socket:/gamil/gamil.git/git-upload-pack", host: "*"
Run Code Online (Sandbox Code Playgroud)
/usr/local/var访问权限为的目录
drwx------ 8 dongli admin 272 4 1 14:55 var
Run Code Online (Sandbox Code Playgroud)
所以我把它改为
drwxr-x--- 8 dongli admin 272 4 1 14:55 var
Run Code Online (Sandbox Code Playgroud)
然后错误终于消失了。
| 归档时间: |
|
| 查看次数: |
4393 次 |
| 最近记录: |