I'm having problems accessing an SVN repository using TortoiseSVN 1.7.8.
The SVN repository is on a CentOS 6.3 box with
# svnadmin --version
# svnadmin, version 1.6.11 (r934486)
svn list svn+ssh://USER@xxx.xx.xx.xxx/var/svn/joetest
Unable to connect to a repository at URL
'svn+ssh://USER@xxx.xx.xx.xxx/var/svn/joetest' To better debug SSH
connection problems, remove the -q option from 'ssh' in the [tunnels]
section of your Subversion configuration file. Network connection
chmod 2700 -R /var/svn/
tail -fn 2000 /var/log/secure
Sep 26 17:34:31 dev sshd: Accepted password for USER from xx.xxx.xx.xxx port 59101 ssh2
Sep 26 17:34:31 dev sshd: pam_unix(sshd:session): session opened for user USER by (uid=0)
Sep 26 17:34:31 dev sshd: pam_unix(sshd:session): session closed for user USER
There's still a third way to invoke svnserve, and that's in “tunnel
mode”, with the -t option. This mode assumes that a remote-service
program such as RSH or SSH has successfully authenticated a user and
is now invoking a private svnserve process as that user. The svnserve
program behaves normally (communicating via stdin and stdout), and
assumes that the traffic is being automatically redirected over some
sort of tunnel back to the client. When svnserve is invoked by a
tunnel agent like this, be sure that the authenticated user has full
read and write access to the repository database files. (See Servers
and Permissions: A Word of Warning.) It's essentially the same as a
local user accessing the repository via file:/// URLs.
Protocol 2 # to disable Protocol 1
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
Subsystem sftp /usr/libexec/openssh/sftp-server
I finally came across a solution for this. In the TortoiseSVN FAQ of all places:
TortoiseSVN Frequently asked questions
From the FAQ:
SVN+SSH: Connection closed unexpectedly
It has been reported that svn+ssh connections of the form svn+ssh://firstname.lastname@example.org which were previously working, stop working with TortoiseSVN 1.5. This seems to be related to plink, and occurs if you have a default hostname set in PuTTY.
If this is the case you can fix it by using regedit or regedt32 to clear HKEY_CURRENT_USER/Software/SimonTatham/Putty/Sessions/Default%20Settings/HostName.
Another user has reported the following server-side fix:
- ssh into your account
- cd ~
- cp /etc/bashrc .bashrc
- nano .bashrc
- put a # before the line "mesg y" (which comments it out)
- Ctrl+X to exit, press Y when prompted to save.
I didn't try the first approach of editing my registry.
The second approach of editing the bash configuration worked for me.
A note about the bash configuration method:
If you're on shared hosting, your user .bashrc file will likely be loading the global /etc/bashrc file. You won't be able to edit the global file, so you'll need to work around that.
Some possible approaches:
mesg n to your user .bashrc file. I'm not sure if this
will work or whether it should be placed before or after the global
file is loaded.
Don't include the global file and hard code all the settings in your
mesg y setting from the global /etc/bashrc file as it's
loading. This question discusses how to do that: Use a grepped file
as an included source in bash