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

Re: [bug] git-clone over ssh fails when repository has local commits

From
Jeff King <peff@peff.net>
Date
Apr 6, 2008, 16:11 UTC
Message-ID
<20080406161120.GB24358@coredump.intra.peff.net>
In-Reply-To
<1caff7430804060645s764f24f8y3d07ee8647ec8f25@mail.gmail.com>
On Sun, Apr 06, 2008 at 02:45:22PM +0100, seventh guardian wrote:
Show 12 quoted lines
>  $ git-clone ssh://<host>/<path>
> Initialized empty Git repository in <path>/.git/
> Password:
> remote: Counting objects: 132468, done.
> remote: Compressing objects: 100% (25543/25543), done.
> remote: Total 132468 (delta 107355), reused 130574 (delta 105466)
> Receiving objects: 100% (132468/132468), 42.12 MiB | 4161 KiB/s, done.
> Resolving deltas: 100% (107355/107355), done.
> error: Trying to write ref REMOTE_HEAD with nonexistant object
> f7a51afd56964cb0f10178353315d2680832ea54
> fatal: Cannot update the ref 'REMOTE_HEAD'.
> Warning: Remote HEAD refers to nonexistent ref, unable to checkout.

It sounds like your remote repository has a bogus HEAD that points to a non-existent object. Can you ssh to <host> and confirm that you can do a "git show HEAD" in the remote repo?

-Peff
Previous: seventh guardianNext: seventh guardian
Message 2 of 11 in “[bug] git-clone over ssh fails when repository has local commits”
  1. seventh guardianApr 6, 2008
  2. Jeff KingApr 6, 2008
  3. seventh guardianApr 6, 2008
  4. Jeff KingApr 6, 2008
  5. seventh guardianApr 6, 2008
  6. Jeff KingApr 6, 2008
  7. seventh guardianApr 6, 2008
  8. seventh guardianApr 6, 2008
  9. Jakub NarebskiApr 6, 2008
  10. Jeff KingApr 6, 2008
  11. seventh guardianApr 6, 2008

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.