Project

General

Profile

Accessing Repository with svn+ssh

Added by Garret Picchioni over 15 years ago

Hello,
I'm experimenting with Redmine looking to transition over from trac and am having an issue that I hope someone might be able to help me with. Here is some information about my setup:

About your application's environment
Ruby version 1.8.5 (i386-linux)
RubyGems version 1.3.1
Rails version 2.1.2
Active Record version 2.1.2
Action Pack version 2.1.2
Active Resource version 2.1.2
Action Mailer version 2.1.2
Active Support version 2.1.2
Edge Rails revision unknown
Application root /opt/redmine-0.8.0_RC1
Environment development
Database adapter mysql

Redmine Version: 0.8.0 RC1
Server OS: CentOS 5.2 x86
Web Server: WEBrick

I'm using svn+ssh to view my repositories in Redmine. I've inserted the correct url (svn+ssh://localhost/svn/repo) and a username and password to use that can access the repo. I have an ssh session to my server open, I've launched Redmine within it and able to watch real time logging as users access the site. Once I click on Repository in that specific project Redmine hangs indefinitely. I look at the ssh session to see if there is any output being generated and notice that I'm being prompted to enter a password for svn authentication using the username that I've specified in my project's settings. If I enter the password, Redmine quickly starts to respond and loads the repository as it's supposed to. I double checked the project's settings to ensure I supplied the correct password and sure enough I did.

Does anyone have any ideas as to why this is happening and how to correct it?

A little off topic but I'm also curious if anyone has any helpful guides around detailing how to tie Redmine into an existing lighttpd installation (I'd like to not use WEBrick). I've been searching all day with no luck.

Thank you,
Garret


Replies (12)

RE: Accessing Repository with svn+ssh - Added by Garret Picchioni over 15 years ago

I'm not seeing where this applies to ssh authentication? I'm only seeing https based repos. Am I just blind?

RE: Accessing Repository with svn+ssh - Added by Mark Shook over 14 years ago

I'm having pretty much the same issue.

production.log reports receiving from the svn command only the following:


<lists>
<list
path="svn+ssh:/var/svn/repository_name">

(Note that this is where if you run the command `svn --xml list "svn+ssh:/var/svn/repository_name"` manually it waits for a password to be entered.)

Apparently svn 1.6.5 and 1.6.6 (maybe others) return the first bit of XML before asking for the password, so redmine throws an exception on the XML parse and reports "The entry or revision was not found in the repository." to the webuser and a 'No close tag for /lists/list' in the production.log

The username and password are set properly in the web interface and obviously it is reading the username correctly according to the 'username@' being present in the URL in production.log. Did you get this resolved? Is this just a configuration error on our part and/or has it been identified as an issue?

--Mark S.

RE: Accessing Repository with svn+ssh - Added by Steve Beaudoin about 14 years ago

As I can see in the file subversion_adapter.rb, the authentication is non interactive and the username and password is passed on the command line :

def credentials_string
str = ''
str << " --username #{shell_quote(@login)}" unless @login.blank?
str << " --password #{shell_quote(@password)}" unless @login.blank? || @password.blank?
str << " --no-auth-cache --trust-server-cert --non-interactive"
str
end

I am using subversion 1.6.6, Redmine 0.8.7 on windows server 2003. I still have the issue for the <list> tag not closed :


Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>

The partial result it received from svn is :



<lists>
<list
path="https://server:5050/svn/Developpement/trunk/Code/Applications%20WPF/KaRiu.NetWave">

On windows, apache is running with the local system account credentials. I opened a command window with psexec from sysinternals to use it as if i am the local system account user (with psexec -i -s cmd.exe). I typed the following command :


svn --config-dir d:\shares\users\steve\repositories\ list --xml https://server:5050/{repository path} --username Steve --password {password} --no-auth-cache --trust-server-cert --non-interactive

I understand that is what redmine would use. I receive :

@

<lists>
<list
path="https://server:5050/{repository path}>
<entry
kind="file">

...

<commit
revision="93">
<author>Steve</author>
<date>2009-12-20T16:20:34.751375Z</date>
</commit>
</entry>
</list>
</lists>
@

As you can see, the whole xml content is there including the closing brackets.

I can see there is a delay of about 250ms right at the moment redmine declare an error, so I suppose it can be a timeout issue. The delay, as Mark explains, is possibly caused by the svn authentication mecanism and the access to the repository.

Please link me to the corresponding ticket about this problem and I would be glad to do any tests you consider necessary.

RE: Accessing Repository with svn+ssh - Added by Bellatoris Opacus about 14 years ago

Is there any more information on this problem or is there a work-around? I'm dealing with a similar issue, but using public/private keys. I've posted my question here: http://www.redmine.org/boards/2/topics/10377

Any help would be greatly appreciated.

RE: Accessing Repository with svn+ssh - Added by Steve Beaudoin about 14 years ago

My problem concern a problem reading a part of the console output, I don't see a link with your problem. Your's seems a problem executing the select query. I can see a svn request, but why does it execute a SQL select query? Are you sure your selected the right source code management provider??

RE: Accessing Repository with svn+ssh - Added by Bellatoris Opacus about 14 years ago

Steve Beaudoin wrote:

My problem concern a problem reading a part of the console output, I don't see a link with your problem. Your's seems a problem executing the select query. I can see a svn request, but why does it execute a SQL select query? Are you sure your selected the right source code management provider??

I'm assuming the question is intended for me. Yes, I'm sure I've selected the right source code management provider. Like I said in the other post, I can connect just fine via the command line using the same call that Redmine appears to be using. I do notice the pause that you mention but am not sure if that is the cause of my problem.

RE: Accessing Repository with svn+ssh - Added by John Doe about 14 years ago

Bumping this one as I have the same issue.

I've noticed that unless I use svn+ssh://*user*@server.com/repository it tries to login as root user.
So I have to add the user to the url, but then it hangs untill I enter the password in the shell, eventhough I've entered it, I've also checked to see if it's really there in the database.

using:
svn, version 1.5.1 (r32289)
redmine 0.8.5
on debian

RE: Accessing Repository with svn+ssh - Added by John Doe about 14 years ago

Running into this from the 0.8.6 changelog, I decided to update:

  • Change subversion adapter to not cache authentication and run non interactively

But I'm running into the same issue with 0.9.0

RE: Accessing Repository with svn+ssh - Added by Alexandre Jobin about 14 years ago

i also have the same issue with 0.9.0

is there any solution?

RE: Accessing Repository with svn+ssh - Added by Nico Brenner about 14 years ago

Hi, I just went through quite a hassle to get Redmine working with svn+ssh. I kept getting a 500 Internal Server Error, checking the log I discovered a problem like this: http://www.redmine.org/issues/3929 with a "No close tag for /lists/list" message, nevertheless it didn't make any sense to me. I'm not using https, so it had nothing to do with certificates, although I'm guessing the steps below would work in that case too.

I was running Redmine behind Apache, according to the instructions here: http://www.redmine.org/wiki/redmine/HowTo_configure_Apache_to_run_Redmine. The problem with this was I couldn't see what was going on, so I switched to running it from the redmine dir using "ruby script/server -e production". Then I was able to see the problem was Redmine needed an additional password and it was asking for it on the console. Since of course I didn't want to or could enter the password each time, I did the following:

  • As root
  • Edited lib/redmine/scm/adapters/subversion_adapter.rb line 228 and removed the "--no-auth-cache" option
  • Edited /etc/passwd to enable a shell for apache
  • Gave write permission to apache on /var/www (it's home dir according to /etc/passwd)
  • Changed user to apache using the su command (su apache)
  • Checked out my svn project in /var/www just so subversion would cache the password
  • Set up password-less ssh login on the svn server with a public key for user apache (followed these instructions: http://blogs.translucentcode.org/mick/archives/000230.html)
  • Tested the password-less ssh login
  • Switched back to root (logged out of the apache shell)
  • Edited /etc/passwd to disable the shell for apache
  • Deleted the checked-out project in /var/www

Then everything worked fine. Now I'm having another problem with yum and some package dependencies to install mod_fastcgi, but that's another story. Hope this helps.

    (1-12/12)