gpt4 book ai didi

git - 错误 : git-upload-pack died of signal 13

转载 作者:太空狗 更新时间:2023-10-29 13:15:16 27 4
gpt4 key购买 nike

我在 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

然后我检查了 GitLab 中的 unicorn.stderr.log 并找到了

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

这个错误是怎么来的?如何解决?提前致谢!

编辑 1:

我检查了存储库:

$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (426/426), done.

所以看起来一切正常,但无法克隆到本地计算机。

编辑 2:

我已经将 GitLab 更新到 6.8,但没有成功。

编辑 3:

我可以通过 ssh 协议(protocol)将有问题的存储库克隆为

$ 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.

编辑 4:

我检查了 unicorn.rb 中的超时:

# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 300

以及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;
}

编辑 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.

所以存储库很好。

最佳答案

我终于通过查看提示的 /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: "*"

访问权限为/usr/local/var的目录

drwx------    8 dongli  admin    272  4  1 14:55 var

所以我改成了

drwxr-x---    8 dongli  admin    272  4  1 14:55 var

然后错误终于消失了。

关于git - 错误 : git-upload-pack died of signal 13,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23200149/

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