Thread (12 messages) 12 messages, 5 authors, 2016-06-15

Re: [PATCH RFC] new config option remote.<name>.pushexec

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:42:49

Uwe Kleine-K?nig [off-list ref] wrote:
Exactly.  Quoting git-send-pack(1):

	Path to the git-receive-pack program on the remote end.
	Sometimes useful when pushing to a remote repository over ssh,
	and you do not have the program in a directory on the default
	$PATH.

For me it would be:

	pushexec = /home/zeisberg/usr/bin/git-receive-pack

While having /home/zeisberg/usr/bin only in my PATH for interactive
shells.  (Yes I know I could expand my PATH which .<someshrc>, but I'd
prefer it that way.)
Some of us have UNIX accounts where our shell is the (retarded)
/usr/bin/ksh on Solaris.  And where the SSH daemon won't seem to
let us set PATH, and where Git isn't in the PATH.  This leaves
us with some difficulty in pointing Git at itself on the remote
system.

I've worked around it with a GIT_SSH wrapper, e.g.

	$ cat >~/bin/mygitssh.sh
	#!/bin/sh
	host="$1"; shift
	exec ssh "$host" "PATH=\"/path/to/git:\$PATH\"; exec $@"
	^D
	$ chmod 755 ~/bin/mygitssh.sh
	$ export GIT_SSH=~/bin/mygitssh.sh

Being able to just set pushexec and fetchexec in the .git/config
file would be nice, but GIT_SSH works well for my sad needs.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help