Subversion on Windows via Cygwin


Cygwin is a wonderful system for running UNIXy/Linuxy software on Windows. While there are many caveats it does work quite well for at least basic tasks and it has been extended so far as to be able to run X/Windows therefore KDE and Gnome all within Windows. Nifty. Anyway, while trying to get it set up for running a Subversion server I was having problems getting it to work as advertised. What I ended up having to do was tell the svnserve program to run as a service/daemon in the foreground rather than splitting off to run in the background as normal, e.g.:

$ cygrunsrv.exe --install svnserve --disp "CYGWIN svnserve" --path /bin/svnserve --args "--daemon --foreground --root=/home/svn"

SVN+SSH problems on Mac OSX


I was trying to get SVN set up as a daemon on my OSX 10.4 (Tiger) machine when I started running into this error upon connection:

bash: line 1: svnserve: command not found
svn: Connection closed unexpectedly

Some searching later I really couldn't find anything that might have been causing the problem, other than the obvious notion that the path was not working correctly. A little fiddling later I discovered the problem - the ssh daemon was by default configured to not load any user environment files (which are used to set the command path, etc). To fix the problem I had to first enable the option PermitUserEnvironment and then restart the service:

sudo nano /etc/sshd_config

Search (control-w) for the string "PermitUser" then uncomment the line (remove the # sign) and change the the "no" to "yes". Then all I had to do was restart the ssh daemon and it was good to go:

sudo SystemStarter -v restart SSH

Et voila!


Subscribe to Subversion