Project

General

Profile

Browsing repository with svn+ssh

Added by M C over 12 years ago

Hi!

I've been trying to force Redmine to attach SVN repository to project for about two days, I've tried every solution which I've found(especially here) and I've completely run out of ideas how to solve problem with "object or version was not found in repository".
Both Redmine and repository are on the same server, Debian Linux.
The output of production.log is typical:

Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>
[...]
No close tag for /lists/list
Line: 
Position: 
Last 80 unconsumed characters:

Output was:
 <?xml version="1.0"?>
<lists>
<list
   path="svn+ssh://my_user@my_server/path_to_svn">

I haven't been installing Redmine, so one of the first things I've done was to check on which user Redmine is running - for me it is nobody , so I've created a home dir for him, then I've been trying every possible way to make Redmine work with password(editing subversion config etc.) with these options in Redmine:

server = svn+ssh://my_user@my_server/path_to_svn
user = my_user
pass = <pass>

Without "my_user@" Redmine was trying to log as nobody, which I've found in logs. After many, many failures I tried today this solution , so I started playing with keys and I can log as nobody and do everything with svn without giving any password:
sudo su nobody
svn co svn+ssh://my_user@my_server/path_to_svn
svn list --xml 'svn+ssh://my_user@my_server/path_to_svn'@HEAD --no-auth-cache --non-interactive

(second command gives beautiful xml;keys are stored in /home/nobody/) and everything is working perfectly, ... but not Redmine.
I was trying to browse repo with giving Redmine user and password and without it(Redmine doesn't need it), now I have these in logs:
'cat /var/lib/redmine/log/production.log'
[...]
 Project Load (0.5ms)   SELECT * FROM "projects" WHERE ("projects"."identifier" = E'<some name>') LIMIT 1
  Repository Load (0.4ms)   SELECT * FROM "repositories" WHERE ("repositories".project_id = 3) LIMIT 1
Shelling out: /usr/bin/svn info --xml 'svn+ssh://my_user@my_server/path_to_svn' --no-auth-cache --non-interactive
  SQL (0.3ms)   BEGIN
  SQL (0.2ms)   COMMIT
  EnabledModule Load (0.6ms)   SELECT name FROM "enabled_modules" WHERE ("enabled_modules".project_id = 3) 
  Setting Load (0.4ms)   SELECT * FROM "settings" WHERE ("settings"."name" = E'autofetch_changesets') LIMIT 1
  SQL (0.1ms)   BEGIN
  SQL (0.1ms)   COMMIT
Shelling out: /usr/bin/svn info --xml 'svn+ssh://my_user@my_server/path_to_svn' --no-auth-cache --non-interactive
  SQL (0.2ms)   BEGIN
  SQL (0.1ms)   COMMIT
Shelling out: /usr/bin/svn list --xml 'svn+ssh://my_user@my_server/path_to_svn'@HEAD --no-auth-cache --non-interactive
Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>
[...]
...
No close tag for /lists/list
Line: 
Position: 
Last 80 unconsumed characters:

Output was:
 <?xml version="1.0"?>
<lists>
<list
   path="svn+ssh://my_user@my_server/path_to_svn">

'sudo cat /var/log/apache2/error.log'
The {{key}} interpolation syntax in I18n messages is deprecated and will be removed in Redmine 1.2. Please use %{key} instead, see http://www.redmine.org/issues/7013 for more information.
<here is server welcome msg>
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: Network connection closed unexpectedly

This is I think three? times per every attempt to browse repo with Redmine
And here is really weird thing:
'cat /var/log/auth.log'
Dec 23 03:53:55 <server_name> sshd[13848]: Failed password for my_user from <server ip> port 42544 ssh2
Dec 23 03:53:55 <server_name> sshd[13848]: Failed password for my_user from <server ip> port 42544 ssh2
Dec 23 03:53:55 <server_name> sshd[13848]: Failed password for my_user from <server ip> port 42544 ssh2
Dec 23 03:53:55 <server_name> sshd[13853]: Failed password for my_user from <server ip> port 42545 ssh2
Dec 23 03:53:55 <server_name> sshd[13853]: Failed password for my_user from <server ip> port 42545 ssh2
Dec 23 03:53:55 <server_name> sshd[13853]: Failed password for my_user from <server ip> port 42545 ssh2
Dec 23 03:53:55 <server_name> sshd[13858]: Failed password for my_user from <server ip> port 42546 ssh2
Dec 23 03:53:55 <server_name> sshd[13858]: Failed password for my_user from <server ip> port 42546 ssh2
Dec 23 03:53:55 <server_name> sshd[13858]: Failed password for my_user from <server ip> port 42546 ssh2

Why is Redmine trying to log WITH PASSWORD (which he doesn't have), when there are keys?
I don't know, maybe I've forgotten about something important, maybe I don't see a trivial solution, but now I'm tired and I'm just looking for any ideas how to solve this annoying problem.