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

clone fails: Could not get the current working directory

From
JFJohn Freeman <jfreeman@cs.tamu.edu>
Date
Sep 21, 2008, 00:49 UTC
Message-ID
<48D59A30.5020403@cs.tamu.edu>
Howdy,
I'm trying to clone a remote repository.  Here's the background:
- The repository is bare, under Bob's home directory on a remote Sun system.
- Bob has set the group permissions for the repo directory to repogroup.
- I have an account on the remote system that is in repogroup.
I am trying to clone the repo on my home machine, using
 > git clone ssh://john@remote.system.edu/home/bob/path/to/repo
It fails with

remote: fatal: Could not get the current working directory error: git-upload-pack: git-pack-objects died with error. fatal: git-upload-pack: aborting due to possible repository corruption on the remote side. remote: aborting due to possible repository corruption on the remote side. fatal: early EOF fatal: index-pack failed

Checking the source code, this error is triggered after getcwd() returns a null pointer in setup.c:set_work_tree(), which is called at only one place, in setup.c:setup_git_directory_gently().

Can anyone provide any insight as to why am I seeing this error?

Thank you, John

Next: Alex Riesen
Message 1 of 12 in “clone fails: Could not get the current working directory”
  1. John FreemanSep 21, 2008
  2. Alex RiesenSep 23, 2008
  3. John FreemanSep 23, 2008
  4. Alex RiesenSep 23, 2008
  5. John FreemanSep 23, 2008
  6. Alex RiesenSep 23, 2008
  7. John FreemanSep 23, 2008
  8. Alex RiesenSep 24, 2008
  9. John FreemanSep 24, 2008
  10. Alex RiesenSep 24, 2008
  11. John FreemanSep 21, 2008
  12. John FreemanSep 22, 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.