[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn+ssh on Mac OS X problem

From: Bryan Donlan <bdonlan_at_gmail.com>
Date: 2004-07-29 00:58:19 CEST

On Wed, 28 Jul 2004 12:48:35 -0500, Robert Guthrie <rguthrie@pobox.com> wrote:
> On Jul 28, 2004, at 11:46 AM, Garry Hill wrote:
> >
> > should work after that. i don't know why svn doesn't look on your path
> > ... bug maybe?
>
> When using svn+ssh, to access a remote repository, you do not end up
> with a shell on the remote machine. Secure shell makes use of an
> environment file that sets you path to the bare minimum of directories.
> It accesses none of your shell settings stored in your home directory.
> I think the file is /etc/environment, but it may differ depending on
> the brand of ssh (free or commercial).
>
> I ran into this and tracked it down in the ssh (commercial version)
> docs. It effectively limits me to accessing the repository on the
> local machine only (rsh is a big no-no at my company), since I can't
> convince anyone to add /usr/local or any other directories to this
> file.
>
> So it's not subversion's fault. Nor is it a Mac OS X problem, for that
> matter.

Can you make a shell script on the remote machine to initalize the
path, then execute it? Given that and a local shell script to wrap ssh
so the script is called on the remote you might be able to work around
this like so:

(remote:/home/user/envsetup.sh)
#!/bin/sh
export PATH=/bin:/usr/bin:/usr/local/bin
exec "$@"

(local:/home/user/svnssh-helper.sh)

#!/bin/sh
HOST="$1"
shift
exec ssh "$HOST" /home/user/envsetup.sh "$@"

(local:subversion/config)

[tunnels]
ssh = $SVH_SSH

Also, if you're using openssh, you might be able to set environment
variables in $HOME/.ssh/environment, if PermitUserEnvironment is
enabled.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 29 00:58:38 2004

This is an archived mail posted to the Subversion Users mailing list.