I've been working for a while now trying to understand SVN better. I am working with a Mac OSX Lion server. I've been able to set up and getting a SVN running on the machine and make it so I can check in and out documents. However, I want to make it accessible to additional services over the internet,so while many of my colleagues and I are traveling, we can still work in conjunction. I have forwarded port 3690 (I believe that's the SVN port) and the port for ssh was set up previously.
I installed the SVN Repository at /Library/Subversion/Repository/
, and I have Versions and Terminal on the server to test with. I can connect by using the file://
path parameter but I can not connect using svn+ssh://username@localhost/MyProject
.
I know for a fact that I can connect through ssh and the error is "No repository found". I'm guessing I need a different path, but all the Mac OS articles I've read only tell how to set it up on the host not for use over LAN or externally.
Any ideas or thoughts are greatly appreciated. As a reference to the steps I've taken below are some of the links to articles I was working from.
First of all, make sure that your Mac firewall isn't blocking you. Can you remotely log in via
ssh
from another system to your system? If not, go to System Preferences, select the Security and Privacy preference, then select Firewall. You'll need to click the Advanced... button.Once there, make sure Remote Login (SSH) is active through the Firewall.
Once you've allowed
ssh
access to your Mac, you'll need to make sure that you havesvn+ssh
setup correctly. Try from your own Mac to access the repository viasvn+ssh://
and not viafile://
. If you can't do that, you don't havesvn+ssh
setup correctly.Setting up Subversion to use
svn+ssh
is the trickiest of the four ways to access a Subversion repository. Unlikesvn://
andhttp://
, the repository server isn't running until the user logs into your system.When a user connects vis
svn+ssh
, they immediately start upsvnserve
in order to access the Subversion repository (that's thesvn
part ofsvn+ssh
).Because
svnserve
runs as the user who usedssh
to access the repository, each directory and file created in the physical repository directory will be owned by that user. Thus, you need to make sure that all users who have access to that repository are in the same primary group, and any created files or directories in the Subversion repository directory are read/writeable by that group.In order to ensure that, you need to take the following steps:
chgrp
command.chmod
command to make sure the entire directory tree are read/writeable by that Subversion group.umask
to002
or0002
instead of the default022
or0022
. This way, when the user creates a new directory or file in the repository, it can be read and written by any other user in the group. Otherwise, one user will create a change, but other users won't be able to make modifications.Take a look at these links from the on line Subversion manual: