git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Elijah Newren" <newren@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: "Johannes Sixt" <j.sixt@viscovery.net>,
	"Jakub Narebski" <jnareb@gmail.com>,
	git@vger.kernel.org
Subject: Re: Unable to clone an ssh repository (with ugly installation-specific workaround)
Date: Wed, 13 Feb 2008 05:57:39 -0700	[thread overview]
Message-ID: <51419b2c0802130457g25892543n9db02e681d9605c5@mail.gmail.com> (raw)
In-Reply-To: <alpine.LSU.1.00.0802121028290.3870@racer.site>

On Feb 12, 2008 3:30 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > A quick work-around for Elijah is to add
> >
> >    GIT_EXEC_PATH=/home/enewren/software/install/linux/git/bin
> >
> > to .profile on the remote host.
>
> I guess you meant .bashrc, as .profile is not sourced when using ssh
> transport (it does not spawn a shell) AFAIR.

As far as I can tell, setting paths in .bashrc doesn't really work (or
else I'm just doing it wrong).  If it did, I would have never hit this
bug.  Observe the difference between (feel free to replace PATH with
GIT_EXEC_PATH; same general result occurs):

  $ ssh localhost
  # Wait for connection to be made, then run
  $ echo $PATH

AND

  $ ssh localhost 'echo $PATH'

AND

  $ ssh localhost 'source .bashrc
  echo $PATH'

The first and the third give the same result, but the second gives
something different.  It is the second form that git uses, meaning
that my paths never get set up.

In my little git wrapper script, I put in some code to work around
this little issue and find git-upload-pack for the user if it can (by
ssh'ing to the machine and sourcing their .bashrc in the ssh command
if necessary; might be a hack, but it makes things nicer for me than
always specifying the -u flag).

Cheers,
Elijah

  parent reply	other threads:[~2008-02-13 12:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12  2:22 Unable to clone an ssh repository (with ugly installation-specific workaround) Elijah Newren
2008-02-12  7:04 ` David Symonds
2008-02-12  8:16 ` Jakub Narebski
2008-02-12  8:37   ` Johannes Sixt
2008-02-12 10:30     ` Johannes Schindelin
2008-02-12 11:28       ` [PATCH] upload-pack: Initialize the exec-path Johannes Sixt
2008-02-12 11:49         ` Johannes Schindelin
2008-02-12 12:45           ` Johannes Schindelin
2008-02-13 13:00             ` Elijah Newren
2008-02-13 12:57       ` Elijah Newren [this message]
2008-02-13 14:17         ` Unable to clone an ssh repository (with ugly installation-specific workaround) Stephen Sinclair

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=51419b2c0802130457g25892543n9db02e681d9605c5@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=jnareb@gmail.com \
    /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).