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

Re: problem connecting to OS X hosts using svn+ssh

From: Dave Camp <dave_at_thinbits.com>
Date: 2005-02-25 17:37:46 CET

On Feb 24, 2005, at 11:08 PM, Zachary Pincus wrote:

> So now the question is which dotfiles do bash or tcsh run when invoked
> non-interactively (which is how sshd invokes them when it uses the
> shell to execute a command). A quick trip to the bash and tcsh man
> pages answers this question:
> man tcsh:
>> Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc
>> on
>> startup.
>
> The bash man page is less clear, but it appears that .bashrc is read
> when rshd (or, presumably, sshd) executes bash:
>> Bash attempts to determine when it is being run by the remote
>> shell
>> daemon, usually rshd. If bash determines it is being run by rshd,
>> it
>> reads and executes commands from ~/.bashrc, if that file exists and
>> is
>> readable.
>
> So in either case, the .bashrc or .tcshrc file should be invoked,
> provided that sshd is in fact running the command from a shell (I
> think there are ways to configure it to not do so, but they are not
> common, and then in that case the error message would be 'sshd:
> svnserve: command not found' or something similar, not 'tcsh:...'.)
> Likewise, etc/bashrc and etc/csh.cshrc get read in either case.

On our machines, we have never observed .tcshrc being run when using
ssh in this manner. Adding the svn path to PATH in this manner was not
effective. Our bash users reported the same thing. Weird.

> The reason this bites Mac users particularly is that many have
> installed subverison via fink, which puts it in /sw/bin. This needs a
> special PATH entry, which sometimes ends up in a .login or .profile
> file.

It also bites if you installed from the Installer packages that are
linked to from the main svn page. They install into /usr/local/bin,
which Apple for some reason has not made a standard search location.

> Now, we can easily test the claim that (at least with tcsh), sshd does
> in fact invoke tcsh in such a manner that it reads the .tcshrc file in
> my home directory:
>
> 1) Note that I've installed svn via fink, so it lives in /sw/bin. The
> only place that '/sw/bin' is added to my path is in a single line my
> ~/.tchsrc on the machine that is the subversion server. (I grep -r'd
> etc/* for any mention of /sw/, and there was none.)
> 2) With this single line intact in the ~/.tchsrc, something like: 'svn
> ls svn+ssh://host/repository' works.
> 3) When I comment out the single line in the .tcshrc file that adds
> /sw/bin to the path, then the same command fails with the message
> 'tcsh: svnserve: Command not found.'
> 4) Restoring the line restores svn functionality.

Not sure what to say about that. It did not work for us on 3 different
10.3.x machines.

In any event, at least we have now documented all this in the list
archives. Maybe it will help others in the future...

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Feb 25 17:40:01 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.