tags:

views:

596

answers:

3

I'm encountering some strange behavior so I'm hoping someone can help shed some light on this. When I do a git push, it ends with a "fatal: The remote end hung up unexpectedly" but checking the git logs and the remote repo seems to indicate the push went through fine. Rerunning the git push returns "Everything is up to date".

So a little background, I have dropbear and git installed on a Palm Pre and am trying to commit changes to a repo on gitorious. Since dropbear is kind of screwy, I had to create a shell script (called sssh) that does the equivalent of

ssh -i ~/.ssh/id_rsa $*

as dropbear will not automatically scan for the publickey. Additionally, I have defined GIT_SSH to be /opt/bin/sssh.

So at this point, everything seems to work but I am not sure why the "fatal" message keeps popping up. Any ideas?

Update: Edited to show what I have in .git/config.

root@castle:/opt/src/modifications# cat .git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "origin"]
    url = [email protected]:webos-internals/modifications.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[remote "all"]
    url = [email protected]:webos-internals/modifications.git
    url = [email protected]:jauderho/webos-hacks.git
+1  A: 

This is only a guess (you should probably ask on the Git For Human Beings Mailinglist or if that doesn't help the developer mailinglist ([email protected])).

My guess is, that either Dropbear itself or your wrapper script exits in such a way that Git thinks there is something wrong with the connection. It might be something as trivial as Git trying to pattern match on some string returned by OpenSSH that is not 100% identical on Dropbear, or a wrong exit code, or something like that.

Jörg W Mittag
[email protected] is the git mailing list, it's not supposed to be the 'developer-only' mailing list or anything.
Charles Bailey
I just tried strace git push origin master and noticed that for some reason .git/refs/remotes/origin/master was missing. I've added that back in but does not seem to make a difference. Will ask the mailing list though.
Jauder Ho
A: 

If you use another ssh client, you have the same error?

I think is maybe a problem with dropbear than a problem with Git.

The refs are for using git push origin master instead of git push ssh://server/path/to/git/repository master

Aragorn
It supposedly works fine with openssh. The problem of needing a shell script in the first place is because dropbear does not look for a keyfile in a default location. I'll update the original post with what I have in .git/config
Jauder Ho
A: 

I get errors with post-commit hooks in Mercurial that make it seem like the transaction failed, but it still succeeds.

Could be something similar.

Matthew Schinckel