2834: Fail to save svn+ssh repository setting

g.sp*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 7, 2013
What version are you running?

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. In "SSH Settings" page, generate a SSH key.
2. Save public key in /home/foobar/.ssh/authorized_keys. (permission 600)
3. In "Add repository" page,
   a. Fill "Name:" field with "SVN+SSH Test".
   b. Select "Subversion" from "Repository type:" field.
   c. Fill "Path:" field with "svn+ssh://foobar@localhost/home/foobar/svn_repo/test".
   d. Click "Save".

What is the expected output? What do you see instead?
I expected that setting was saved successfully.
But it showed error message; "A repository was not found at the specified path."

What operating system are you using? What browser?
CentOS 6.3

Please provide any additional information below.
I tried to save a svn+ssh repository setting.
I got error below.

2012-12-21 01:30:55,101 - DEBUG - SVNTool: Attempting ssh connection with host: localhost, username: foobar
2012-12-21 01:30:55,110 - DEBUG - starting thread (client mode): 0xb61260acL
2012-12-21 01:30:55,123 - INFO - Connected (version 2.0, client OpenSSH_5.3)
2012-12-21 01:30:55,130 - DEBUG - kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
2012-12-21 01:30:55,130 - DEBUG - Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
2012-12-21 01:30:55,131 - DEBUG - using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
2012-12-21 01:30:55,262 - DEBUG - Switch to new keys ...
2012-12-21 01:30:55,266 - DEBUG - Trying SSH key 761c0dd8f99d2daddc83b47a484bf3d2
2012-12-21 01:30:55,302 - DEBUG - userauth is OK
2012-12-21 01:30:59,535 - INFO - Authentication (publickey) successful!
2012-12-21 01:30:59,636 - DEBUG - EOF in transport thread
2012-12-21 01:31:00,048 - ERROR - SVN: Failed to get repository information for svn+ssh://foobar@localhost/home/foobar/svn_repo/test: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
Network connection closed unexpectedly
2012-12-21 01:31:00,111 - DEBUG - EOF in transport thread

For debugging, I added 2 settings to "$RB_PATH/htdocs/reviewboard.wsgi" as below.

os.environ['DEBUG_RBSSH'] = "1"
os.environ['RBSSH_LOG_DIR'] = "/tmp"

And I added traceback in SSHClient class as below.

    def _load_storage(self):
        """Loads the storage backend.

        This will attempt to load the SSH storage backend. If there is an
        error in loading the backend, it will be logged, and an
        ImproperlyConfigured exception will be raised.
            path = getattr(settings, 'RBSSH_STORAGE_BACKEND',
        except ImportError:
            # We may not be running in the Django environment.
            path = self.DEFAULT_STORAGE
            import traceback

I restarted server and tried to save repository setting again.
I got error below in "/tmp/rbssh-11273.log".

12-21 01:48 root               DEBUG    ['/usr/bin/rbssh', 'foobar@localhost', 'svnserve', '-t']
12-21 01:48 root               DEBUG    PID 11273
12-21 01:48 root               DEBUG    !!! localhost, foobar, ['svnserve', '-t']
12-21 01:48 root               DEBUG    Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.6.14-py2.6.egg/reviewboard/ssh/client.py", line 78, in _load_storage
  File "/usr/lib/python2.6/site-packages/Django-1.3.4-py2.6.egg/django/utils/functional.py", line 276, in __getattr__
  File "/usr/lib/python2.6/site-packages/Django-1.3.4-py2.6.egg/django/conf/__init__.py", line 42, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/python2.6/site-packages/Django-1.3.4-py2.6.egg/django/conf/__init__.py", line 90, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.6/site-packages/Django-1.3.4-py2.6.egg/django/utils/importlib.py", line 35, in import_module
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.6.14-py2.6.egg/reviewboard/settings.py", line 168, in <module>
    dependency_error('Unable to import settings_local.py: %s' % exc)
  File "/usr/lib/python2.6/site-packages/ReviewBoard-1.6.14-py2.6.egg/reviewboard/settings.py", line 155, in dependency_error
SystemExit: 1

I added below setting "PYTHONPATH" to "$RB_PATH/htdocs/reviewboard.wsgi" as below.

os.environ['PYTHONPATH'] = "/var/lib/reviewboard/conf"
sys.path = ['/var/lib/reviewboard/conf'] + sys.path

I restarted server and tried to save repository setting again.
I got log below and could save successfully.
It seemed to work fine.

2012-12-21 01:58:27,562 - DEBUG - SVN: Got repository information for svn+ssh://foobar@localhost/home/foobars/svn_repo/test: [('test', <PysvnInfo ''>)]
#1 david
  • +Component-SSH
#2 david
This was fixed in 1.7.6 (http://www.reviewboard.org/docs/releasenotes/reviewboard/1.7.6/)
  • +Fixed