git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul Johnston" <pcj127@gmail.com>
To: git@vger.kernel.org
Subject: git-clone: path or ssh problem with git-upload-pack in 1.6.0?
Date: Mon, 15 Sep 2008 01:30:16 -0700	[thread overview]
Message-ID: <d3a045300809150130w6f78edd8xf599d1c7f639b77d@mail.gmail.com> (raw)
In-Reply-To: <d3a045300809091929h18c3c447gb3d4e79131f66986@mail.gmail.com>

I'm having trouble with git-clone and I'm wondering if there's
something I'm doing wrong or something wrong with git.  Probably the
former, hopefully someone can set me straight.

I'm an admittedly novice git user. I'm trying to clone a repository
over ssh. The host machine 'imac' is my mac osx 10.4 with git 1.6.0
installed from a macports package.  This installs into /opt/local/bin.
I also cloned git from HEAD and 'make; make install'ed into ~/bin,
this is the version shown below.  Either way, these are
nonstandard/non-system-wide installation locations, and it requires
that my shell PATH reflect this, obviously.

----------------------------------------------

# About my installation
imac:~ paul$ which git
/Users/paul/bin/git

imac:~ paul$ git --version
git version 1.6.0.1.285.g1070

imac:~ paul$ ls /opt/local/bin/git*
/opt/local/bin/git
/opt/local/bin/git-upload-archive       /opt/local/bin/gitk
/opt/local/bin/git-receive-pack         /opt/local/bin/git-upload-pack

imac:~ paul$ ls ~/bin/git*
/Users/paul/bin/git
/Users/paul/bin/git-shell
/Users/paul/bin/git-upload-pack
/Users/paul/bin/git-receive-pack
/Users/paul/bin/git-upload-archive

# Make a simple reposirtory /tmp/test/.git
imac:~ paul$ cd /tmp
imac:/tmp paul$ mkdir test; cd test; echo 'Hello World' > README; git
init; git add README; git commit -a -m'Initial import'; cd ..
Initialized empty Git repository in /private/tmp/test/.git/
Created initial commit 49c10e6: Initial import
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 README

# OK, this fails expectedly
imac:/tmp paul$ cd ~
imac:~ paul$ git clone ssh://localhost/tmp/test/.git
Initialized empty Git repository in /Users/paul/test/.git/
Password:
bash: line 1: git-upload-pack: command not found
fatal: The remote end hung up unexpectedly

# This has been killing me...  Have tried numerous variants of the
same with similar results...
imac:~ paul$ git clone --upload-pack /opt/local/bin/git-upload-pack
ssh://localhost/tmp/test/.git
Initialized empty Git repository in /Users/paul/test/.git/
Password:
remote: fatal: exec pack-objects failed.
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

# Fix it with symlinks in /usr/bin
imac:~ paul$ cd /usr/bin/
imac:/usr/bin paul$ sudo ln -s /opt/local/bin/git* .
imac:/usr/bin paul$ ls -al git*
lrwxr-xr-x   1 root  wheel  18 Sep  9 19:18 git -> /opt/local/bin/git
lrwxr-xr-x   1 root  wheel  31 Sep  9 19:18 git-receive-pack ->
/opt/local/bin/git-receive-pack
lrwxr-xr-x   1 root  wheel  33 Sep  9 19:18 git-upload-archive ->
/opt/local/bin/git-upload-archive
lrwxr-xr-x   1 root  wheel  30 Sep  9 19:18 git-upload-pack ->
/opt/local/bin/git-upload-pack
lrwxr-xr-x   1 root  wheel  19 Sep  9 19:18 gitk -> /opt/local/bin/gitk

# And now git-clone works as expected...
imac:/usr/bin paul$ cd
imac:~ paul$ git clone ssh://localhost/tmp/test/.git
Initialized empty Git repository in /Users/paul/test/.git/
Password:
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.

imac:~ paul$ find test/
test/
test//.git
  { file listing removed for brevity... }
test//README

-------------------------------------------

OK, great, now it works. I suspect I'm not using the --upload-pack
option correctly or my ssh installation is suboptimal, but as I could
find no existing documentation on the subject, I am posting this
message.  Any thoughts?

Paul Johnston

  reply	other threads:[~2008-09-15  8:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10  2:29 git-clone: path or ssh problem with git-upload-pack in 1.6.0? Paul Johnston
2008-09-15  8:30 ` Paul Johnston [this message]
2008-09-15 16:24   ` [PATCH] help git-upload-pack find git Michael J Gruber
2008-09-15 19:34     ` Junio C Hamano
2008-09-15 20:22       ` Michael J Gruber
2008-09-16  6:17         ` Johannes Sixt
2008-09-16 13:15           ` Michael J Gruber
2008-09-16 13:43             ` Johannes Sixt
2008-09-16 15:38               ` Michael J Gruber
2008-09-15 16:25   ` git-clone: path or ssh problem with git-upload-pack in 1.6.0? Michael J Gruber
2008-09-15 22:39 ` Michael Wookey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3a045300809150130w6f78edd8xf599d1c7f639b77d@mail.gmail.com \
    --to=pcj127@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).