Cannot clone repository in freenas jail

354 views
Skip to first unread message

Saurav Ghosh

unread,
May 19, 2013, 3:06:39 AM5/19/13
to msysGit
Hi,

I am unable to clone a git repository in a freenas jail, from Windows
Vista 32-bit using 1.8.1.2 of git bash. I get this

============================================
$ git clone git@freenas:repos/project.git
Cloning into 'project'...
error: cannot run pack-objects: No such file or directory
fatal: git upload-pack: unable to fork git-pack-objects
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: recursion detected in die handler
============================================

This is kind of expected, since the git binaries are in a freenas
jail, so they are not immediately accessible by just ssh'ing to the
machine. So I specify the upload pack manually, but then I get this:

============================================
$ git clone --verbose -u /mnt/Home/plugins/x64/jail/software/usr/local/
bin/git-upload-pack git@freenas:repos/project.git
Cloning into 'project'...
bash: D:/software/Git/mnt/Home/plugins/x64/jail/software/usr/local/bin/
git-upload-pack: No such file or directory
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository
exists.
============================================

I don't understand this error. Bash seems to be trying to run the git-
upload-pack from my installation directory on Windows (D:\Software
\Git). I though the purpose of "-u" was to specify the location of
git-upload-pack *on the server*.

This second method works fine from Linux and OS X.

Please note that since git is in a freenas jail, the git binaries
cannot be accessed directly from ssh:
===============================
$ ssh git@freenas git version
bash: git: command not found

Yet, I can clone the repository from Linux and OS X.

Any insight into what's going on?

Thanks,
Saurav.

Erik Faye-Lund

unread,
May 19, 2013, 5:55:17 AM5/19/13
to Saurav Ghosh, msysGit
The problem is that MSYS sees a POSIX-path on the commendline, and
translates it to a Win32-path. You can set the GIT_TRACE environment
variable to 1, and it becomes quite visible what happens.

Read http://www.mingw.org/wiki/Posix_path_conversion for details.

So, in short: the -u parameter doesn't work from bash on Windows, and
there's nothing obvious we can do to fix it. You can try to do the
initial clone from cmd, perhaps?

Saurav Ghosh

unread,
May 19, 2013, 12:17:20 PM5/19/13
to msysGit
Thanks.  I could clone it from cmd.exe.  That would work for my purposes, since I don't really care about using bash/cygwin on WIndows.

For the record, I prefixed the git/bin directory to my path before doing anything:

set PATH=D:\Software\Git\bin;%PATH%

Thanks again.

Regards,
Saurav.

Reply all
Reply to author
Forward
0 new messages