git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git push failure in the case of SSH to localhost

From
Ciprian Dorin, Craciun <ciprian.craciun@gmail.com>
Date
Feb 11, 2009, 16:24 UTC
Message-ID
<8e04b5820902110824u1ab99cc1r4df6349b20d62f84@mail.gmail.com>
    Hello all!
    I've encountered the following error situations: git fails to push
a branch over ssh to localhost, even with file: protocol it has the
same behaviour... Please see the transcript... (Git version is
1.6.1.1) I don't think I'm doing something wrong, because this works
just fine with a real remote host...
    Thanks,
    Ciprian Craciun.
    P.S.: I'm using a slightly modified version of Git, but this patch
affects only the PATH-like search mechanism for git commands.
----
    0  git version
git version 1.6.1.1.dirty
    1  cd /tmp
    2  mkdir r1
    3  cd r1
    4  git init
    5  cd ..
    6  mkdir r2
    7  cd r2
    8  git init --bare
    9  cd ..
   10  cd r1
   11  echo a>a
   12  git add .
   13  git commit -m '--'
   14  git push ssh://localhost/tmp/r2 master
Counting objects: 3, done.
Writing objects: 100% (3/3), 197 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
error: unpack should have generated
ea8c5601f49a4bdeea03db3adb909d590ea730d3, but I can't find it!
To ssh://localhost/tmp/r2
 ! [remote rejected] master -> master (bad pack)
error: failed to push some refs to 'ssh://localhost/tmp/r2'
   15  git push file:///tmp/r2 master
Counting objects: 3, done.
Writing objects: 100% (3/3), 197 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
error: unpack should have generated
ea8c5601f49a4bdeea03db3adb909d590ea730d3, but I can't find it!
To file:///tmp/r2
 ! [remote rejected] master -> master (bad pack)
error: failed to push some refs to 'file:///tmp/r2'
    16 git push ssh://hephaistos.tartarus./tmp/r2 master
Counting objects: 3, done.
Writing objects: 100% (3/3), 197 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To ssh://dom1.hephaistos.tartarus./tmp/r2
 * [new branch]      master -> master
Next: Jeff King
Message 1 of 17 in “Git push failure in the case of SSH to localhost”
  1. Ciprian Dorin, CraciunFeb 11, 2009
  2. Jeff KingFeb 11, 2009
  3. Ciprian Dorin, CraciunFeb 11, 2009
  4. Jeff KingFeb 11, 2009
  5. Ciprian Dorin, CraciunFeb 11, 2009
  6. Shawn O. PearceFeb 11, 2009
  7. Ciprian Dorin, CraciunFeb 11, 2009
  8. Jeff KingFeb 11, 2009
  9. Ciprian Dorin, CraciunFeb 11, 2009
  10. Jeff KingFeb 11, 2009
  11. Ciprian Dorin, CraciunFeb 11, 2009
  12. Junio C HamanoFeb 11, 2009
  13. Ciprian Dorin, CraciunFeb 11, 2009
  14. Johannes SchindelinFeb 11, 2009
  15. Junio C HamanoFeb 11, 2009
  16. Ciprian Dorin, CraciunFeb 11, 2009
  17. Junio C HamanoFeb 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.