Reputation: 11677
I have a new desktop running Ubuntu. I have rsynced a bunch of git repos from my previous computer to my new one. I can push and pull with these all with no problem. However, if I do a git clone
on a new repository (we use gitolite and gitflow), any git push
hangs. Even if I can successfully push an rsynced project, doing a git clone
of the project from gitolite is successful but results in a project I cannot push. The .git/config
files are identical.
My computer:
$ 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 push output (or read the strace output):
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)
And it hangs forever after the Total 28 (delta...
line.
A successful push from the same project, but from the rsynced directory, looks like this:
To gitolite:libs/perl/ThirdParty-Sync
8c056a5..0321b35 users/ovid -> users/ovid
The only symptom (red herring?) I can think of which might be related is this:
$ ssh gitolite
PTY allocation request failed on channel 0
I have to add a -T to make that work.
Again, I can successfully push if I'm in the rsynced ThirdPart-Sync
directory. It's only if I try to clone that project again from out gitolite server that it fails.
Update: Turns out it doesn't hang forever. After quite a while, I get the following after the Total 28
line.
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Update Running strace doesn't tell me what's going on. On a repo I cannot push:
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,
Running a strace on a repo I can push gives me this from approximately the same spot:
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
Upvotes: 4
Views: 1429
Reputation: 1327264
The OP Ovid stated in the comment
VonC: After much hell, I switched from an dsa ssh key to an
rsa
ssh key and everything started working.
The Gitolite documentation "how gitolite uses ssh" only mentions rsa keys.
So it seems safe to keep using that particular kind of key.
The check utility (packaged with gitoite) sshkeys-lint
only parse for rsa (or dss)
Upvotes: 3
Reputation: 1510
try comparing the config in the new repos. The defaults change between git versions.
Upvotes: 0
Reputation: 11
Can you push any repos to Gitolite? Or just ones you didn't rsync over?
What about your ~/.gitconfig?
If I were in your situation, I would try two things:
strace to figure out what git-push/ssh are waiting on.
Use the ControlMaster/ControlPath SSH in ~/.ssh/config to create a shared SSH connection, and try to push after running ssh -T gitolite.
Upvotes: 1