我有一个运行 Ubuntu 的新桌面。我已经将一堆 git repos 从我以前的计算机同步到我的新计算机。我可以毫无问题地推拉这些。但是,如果我git clone
在一个新的存储库上做一个(我们使用 gitolite 和 gitflow),任何git push
挂起。即使我可以成功推送一个 rsynced 项目,git clone
从 gitolite 做一个项目也是成功的,但会导致我无法推送一个项目。这些.git/config
文件是相同的。
我的电脑:
$ uname -a
Linux ovid-desktop 3.0.0-16-generic #29-Ubuntu SMP Tue Feb 14 12:48:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Git 推送输出(或读取 strace 输出):
GIT_TRACE=1 git push -vv origin users/ovid
trace: built-in: git 'push' '-vv' 'origin' 'users/ovid'
Pushing to gitolite:libs/perl/ThirdParty-Sync
trace: run_command: 'ssh' 'gitolite' 'git-receive-pack '\''libs/perl/ThirdParty-Sync'\'''
trace: run_command: 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'
trace: exec: 'git' 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'
trace: built-in: git 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress'
Counting objects: 53, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (28/28), 2.59 KiB, done.
Total 28 (delta 13), reused 0 (delta 0)
它在这条线之后永远挂起Total 28 (delta...
。
来自同一个项目但来自 rsynced 目录的成功推送如下所示:
To gitolite:libs/perl/ThirdParty-Sync
8c056a5..0321b35 users/ovid -> users/ovid
我能想到的唯一症状(红鲱鱼?)可能与此有关:
$ ssh gitolite
PTY allocation request failed on channel 0
我必须添加一个 -T 才能使其正常工作。
同样,如果我在 rsyncedThirdPart-Sync
目录中,我可以成功推送。只有当我尝试从 gitolite 服务器再次克隆该项目时,它才会失败。
更新:原来它不会永远挂起。过了好一阵子,我在行后得到以下Total 28
信息。
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
更新运行 strace 并没有告诉我发生了什么。在回购中,我无法推送:
wait4(4122, Counting objects: 53, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (28/28), 11.62 KiB, done.
Total 28 (delta 3), reused 28 (delta 3)
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 4122
--- SIGCHLD (Child exited) @ 0 (0) ---
read(3,
在我可以推送的 repo 上运行 strace可以从大致相同的位置给我这个:
write(9, "^0321b3501969dead78a83a0d3234724"..., 42) = 42
write(9, "b9cbbc6cc37100baf706746205e7a4c4"..., 41) = 41
close(9) = 0
wait4(4632, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 4632
--- SIGCHLD (Child exited) @ 0 (0) ---
read(6, "000e", 4) = 4
read(6, "unpack ok\n", 10) = 10
read(6, "001d", 4) = 4
read(6, "ok refs/heads/users/ovid\n", 25) = 25
read(6, "0000", 4) = 4
futex(0x7f8a49c619d0, FUTEX_WAIT, 4631, NULL) = 0