PDA

View Full Version : anyone using svnx with svn+ssh authentication?




janey
Mar 16, 2006, 06:08 AM
I'm totally utterly frustrated with this, so if there's someone out there who can help me, that would rock.

I set up an svn repository on my website for a project, and things were running pretty smoothly. In Terminal.app, that is. I was getting along just fine with my svn co svn+ssh://user@website/repository ~/Documents/svn stuff, et cetera. My preferred GUI frontend to svn is svnx, which I've found to be one of the best for OS X. So I wanted to use svnx to do (various things).

Now, just putting in path/user/pass in svnx didn't seem to work - "Permission denied, ....svn: Connection closed unexpectedly", so I googled around a bit. Came across the svnx forums. In there, I noticed that I was most definately not the only person wondering wtf was going on. I must have read every single thread on the forums that mentioned ssh, and I tried everything under the sun (the identity/pubkey deal (which...i already had...), the five different apps mentioned (except sshlogin, which doesn't seem to work now), and logging in once before using it with svnx) that was mentioned there.

Still doesn't work. I've done all sorts of things - tried the beta version of svnx from the developer that had the authentication support or whatever, started allll over with everything that could possibly go wrong, and always it works in terminal but never in svnx.

Any sort of help would be appreciated :(

Also, links - this is the stuff I've looked at/tried
http://www.bmannconsulting.com/node/1280
http://www.securityfocus.com/infocus/1810
http://svnx.lachoseinteractive.com/viewtopic.php?t=52
http://svnx.lachoseinteractive.com/
http://svn.haxx.se/users/archive-2004-08/1291.shtml
http://forum.textdrive.com/viewtopic.php?id=8094
http://forums.macosxhints.com/showthread.php?t=50836

:mad: :mad: :mad: :rolleyes: :mad: :mad:



SamMiller0
Mar 21, 2006, 04:29 PM
I use svn+ssh authentication with Xcode without any issues. I have not tried, svnx though. I'll download it and let you know if I run into similar issues.

SamMiller0
Mar 21, 2006, 04:44 PM
Ok, I just downloaded svnx and updated my svn client to the latest version 1.3. I don't seem to have any issues using svnx with our svn repository. Perhaps it's an ssh configuration issue on your end?

cbiffle
Mar 21, 2006, 05:25 PM
Do you get anything on the Console? svn reports "Connection closed unexpectedly" whenever ssh dies out from under it, which includes crashing or exiting with an error code. If you're lucky, svnx will blow the error report to the Console.

janey
Mar 21, 2006, 07:32 PM
Ok, I just downloaded svnx and updated my svn client to the latest version 1.3. I don't seem to have any issues using svnx with our svn repository. Perhaps it's an ssh configuration issue on your end?
hey, what exactly was it that you did though? I've tried everything someone told me, and I seem to be the only person having trouble with it even on the server i'm on. svnx doesn't output anything to console that i've seen so far, but it does tell me just that "connection closed unexpectedly" error.

svnx works fine with my non-svn+ssh repositories, so..

SamMiller0
Mar 22, 2006, 06:46 AM
hey, what exactly was it that you did though? I've tried everything someone told me, and I seem to be the only person having trouble with it even on the server i'm on. svnx doesn't output anything to console that i've seen so far, but it does tell me just that "connection closed unexpectedly" error.

svnx works fine with my non-svn+ssh repositories, so..

Here is how I have svnx configured

http://www.scl.ameslab.gov/~samm/svnx.png

The only difference I see between my setup and yours, is I did not enter a username and password since I have my ssh keys setup so it's not required.

janey
Mar 23, 2006, 04:06 AM
Here is how I have svnx configured

// image link removed

The only difference I see between my setup and yours, is I did not enter a username and password since I have my ssh keys setup so it's not required.
Hmm, still no can do. Works fine with everything but svnx :\

I guess I just won't be using it for that particular repository then

Thanks though :)

stockli
Apr 26, 2006, 05:52 PM
Hi there,

I just went through the same problem, and finally managed to get it to work.

I followed the instructions (here (http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html), and here (http://berserk.org/2005/10/08/textmate-and-a-remote-editing-workaround/)) to get a public key pair setup, which allowed me to call "svn list svn+ssh://{username}@{ip}/path/to/repo/" without being prompted for a password.

After that, I cleared my username and password out of the repo settings screen in svnX, and used the exact url from above: "svn+ssh://{username}@{ip}/path/to/repo/", so that my screen only shows the repository name, and the path.

I didn't find it necessary to load svnX from the terminal using the open command as some others suggested. I was able to open it normally...

I think what made the difference was clearing my username and password from those fields. It seemed to be trying to authenticate twice or something, which always ended up giving me access denied.

Hope this helps!

Matt

janey
Apr 27, 2006, 06:50 PM
just to make it clear, are you suggesting putting the svn+ssh://user@ip/path/to/repository and no password in the url and no username/password in the appropriate fields in svnx?

don't remember if i already tried it with that particular one, but i'm not at home right now, but will give it a try when i get back
thanks :)

stockli
Apr 28, 2006, 08:23 AM
just to make it clear, are you suggesting putting the svn+ssh://user@ip/path/to/repository and no password in the url and no username/password in the appropriate fields in svnx?

don't remember if i already tried it with that particular one, but i'm not at home right now, but will give it a try when i get back
thanks :)

Janey,

Yes, that is exactly correct. So, in the repo settings screen, you should have only the "Name:" and "Path:" boxes populated. Basically, as I understand it, you're essentially pre-authenticated by doing the public key pairing stuff that you outlined above. The only other thing to make note of is that I didn't choose a passphrase when I generated my public key. This probably gives all the security people heart attacks, but if I didn't do that I still got a password challenge. The other thing to try, I suppose (thought I didn't) is that if you DID choose a passphrase, then type the passphrase into the password box in the repo settings screen and leave the username box empty. But, I didn't try that, so I really don't know if it'll work or not.

Just to lend context, I'm using the SVN setup on Site5. I'm sure it's basically the same everywhere, though. I've previously used svnX to connect to repos served via svnserve, and have never had any problems with those...

Let me know how it goes!

Matt

lelf
Aug 7, 2007, 07:33 AM
Hi there,

I followed matt's instructions to get svnX to work with ssh keys.

1. Generate ssh key without password as described (here (http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html).

2. Add your public key to the remote machine's authorized keys:
open /home/{linux-username}/.ssh/authorized_keys
add the following line: command="svnserve -t -r /path/to/repositories --tunnel-user={svn-username}",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ssh-rsa {rsa-key}

3. To make sure your setup is correct, access the repository from terminal window:
"svn list svn+ssh://{linux-username}@{ip}/path/to/repo/".

4. Add the repository to svnX:
Path: "svn+ssh://{linux-username}@{ip}/path/to/repo/"
User: void
Pass: void

This works fine as long as I keep my ssh port on 22. Unfortunately, my svn server shares its IP with other machines and I would prefer to use a different port (e.g. 8999). I tried to include the port number into the above address ("svn+ssh://{linux-username}@{ip}:8999/path/to/repo/"), but this does not seem to work. Any ideas?

Thanks,
Lukas

scottmeves
Feb 9, 2008, 03:55 PM
You can't specify a non-standard port in the svn+ssh address name, so usually you would accomplish this by setting a local environment variable "SVN_SSH" like so:

export SVN_SSH="ssh -p xxxx"

where xxxx is the port number.

It doesn't appear that svnX uses your .bash_login environment variables before running it's commands, so it's not getting your non-standard ssh port. What you CAN do, add custom ssh hostnames that use your non standard port, and then pass these to svnx as the path. Open up ~/.ssh/config (or create it if it doesn't exist) and add a host name like so:

host svn1
Hostname svn.yourdomain.com
Port xxxx
ForwardAgent no
ForwardX11 no


And then finally, when you put in the path in svnx, use "svn1" as the hostname:
Path: svn+ssh://username@svn1/path/to/repository

Hopefully that helps someone!
Scott

spaceballl
Apr 8, 2008, 02:23 AM
I know this thread is old, but I just wanted to say thanks! It was very helpful in solving my svnx issue!!

Saliwa
Apr 8, 2008, 03:57 AM
You are still using Svn? Move to Git or Mercurial, specially if you are on a team. you won't regret it. ;)

spaceballl
Apr 8, 2008, 10:06 AM
You are still using Svn? Move to Git or Mercurial, specially if you are on a team. you won't regret it. ;)
Would if I could, but it's not my call! :D

janey
Jul 9, 2008, 06:53 AM
You are still using Svn? Move to Git or Mercurial, specially if you are on a team. you won't regret it. ;)
Oh dear lord, I opened this thread over TWO YEARS AGO. ;)

I must say as much as I like git or hg, moving is a no-can-do for some projects I'm working on. don't even get me started on the reasons why. there's some other problematic dependencies, like, last i checked the trac hg and git plugins i've peeked at weren't that great. but that was a while ago..

also i have to note, at risk of being flamed massively by the dvcs fanbase, that for personal private use I have flipflopped around the various options and I don't see THAT much of a point to moving from svn. svn works for me, versions.app is a gorgeous beauty, git-svn works where svn doesn't (mostly when i'm offline), why budge from something that works? Almost every single reason to go distributed is irrelevant to me. (But yes, on a team, would be fantastic, but easier said than done.)

Not asking for someone to convert me, but since svn has worked fantastically for me for so long, I don't yet see a compelling reason to change anything.


Lastly, unfortunately, I don't remember if the problem I originally had ever resolved itself or how...oh well :(

mepster
Jul 3, 2009, 01:06 AM
Hi all,

Had a similar problem getting svn+ssh to work in xcode (not svnx) with a nonstandard port. Turns out actually if you specify ANY port in the repository configuration, it doesn't work. (Effectively, you can only specify no port, which defaults to 22.) This is a known issue in xcode 3.1.2, see

see http://developer.apple.com/releasenotes/developertools/RN-Xcode/index.html#//apple_ref/doc/uid/TP40001051-DontLinkElementID_1
and search for 5801847

It says:
"Using a port number when setting up a Subversion repository in the Repositories panel generates an inaccurate svn+ssh: URL. Instead of entering the port number in the Repository setup pane, leave off the port number in Xcode and add an entry with the port number in ~/.ssh/config for the desired host. 5801847"

It has other problems properly reading the .ssh/config file as well. Like you can't use an alias for the "Host:" - you have to use the actual hostname. I don't know what that's about... I think it's (wrongly) checking if that alias is a real host with an ip (?). I finally got it to work with this in my .ssh/config file:



Host my.host.name
HostName my.host.name
Port 1234


P.S. I am running xcode 3.1.3 so they haven't fixed it there.

spaceballl
Jul 8, 2009, 06:11 PM
I just decided to pay for Versions. It's a huge improvement over SVNX. If you use SVN a lot, Versions is worth the $.