1592: Shouldn't factor out the username when checking a Subversion repository in username@server form
- Fixed
- Review Board
Phil.*****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
June 11, 2010 |
What version are you running? 1.5 beta 1 What's the URL of the page containing the problem? /admin/db/scmtools/repository/add/ What steps will reproduce the problem? 1. Leave the hosting service as "Custom" 2. Select "Subversion" as the repository type. 3. Set the path to "svn+ssh://username@some.valid.hostname/suffix" What is the expected output? What do you see instead? Expect to see the repository added; instead see a "(-2, 'Name or service not known')" error (looks like a socket.gaierror. What operating system are you using? What browser? CentOS 5 in an OpenVZ container; Google Chrome on OS X for the browser. Please provide any additional information below. Doing some additional debugging, I notice that the hostname that Reviewboard attempts to resolve includes the username (i.e. username@some.valid.hostname). We are using pre-shared keys for repository access, if it makes any difference.
Still seeing the same error, but the host resolution now seems to be working. We were able to add repositories with paths like the above in ReviewBoard 1.0.5, just not in the beta. I'm working on getting a development environment up and running to debug this properly. From what I can tell, the issue lies in the new check_repository functionality: * repository_information = urlparse.urlparse("svn+ssh://username@some.valid.hostname/suffix") * repository_information[1] = "username@some.valid.hostname" * repository_information.hostname = "some.valid.hostname" The SSH check in SCMTool uses urlparse.urlparse(path)[1], yielding the netloc and not the hostname.
Correction -- it isn't the same error, it just doesn't find the repository. Looking at the SSH server, the username given in the configuration isn't being used to connect. Normally, I'd route around this by specifying a User entry in the .ssh/config for the Host, but I have multiple repositories accessible to different users on this host, which will prevent this from working.
Okay. Well, we should handle parsing out the username when checking the host anyway, so I definitely agree on that. I'm about to head out of town, so I can't really fix this immediately. However, if you wanted to give it a shot, we can get it into a nightly soon.
-
+ Confirmed -
- Priority-Medium + Priority-High + Milestone-Release1.5 + Component-SCMTools -
+ Shouldn't factor out the username when checking a Subversion repository in username@server form
I posted a review for the diff at http://reviews.reviewboard.org/r/1503/ Thanks, Phil
Updated the diff to work with Python 2.4.
It would be nice if there was a DHTML display that showed the full URL, including protocol, username, and path - that will be used to connect/verify the repo. Should I make a feature request?