Re: Unable to clone an ssh repository (with ugly installation-specific workaround)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 12, 2008 3:30 AM, Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux