No announcement yet.

Is this how to set up svn+ssh on UNIX?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Is this how to set up svn+ssh on UNIX?

    Hi all --

    I don't have the strongest UNIX background, so I'm a little concerned about getting SVN set up correctly and securely for remote access by multiple shell users. I've done a whole bunch of reading and googling, and this is what I came up with... Is this list of steps that one needs to take (after simply getting the software installed) correct and complete?

    1) Create an "svn" group for all SVN users:
    $ sudo groupadd svn
    2) Create an "svn" user for svnserve to run as:
    $ sudo useradd -g svn svn
    $ passwd svn
    3) Create wrappers for svnserve, svnadmin, and svnlook that apply a umask:
    (This doesn't have to be done for the svn command? this seems to imply that it doesn't, but I don't understand why not.)

    a) move binaries to another location:
    $ sudo mv /usr/bin/svnserve /usr/bin/svnserve.real
    $ sudo mv /usr/bin/svnadmin /usr/bin/svnadmin.real
    $ sudo mv /usr/bin/svnlook /usr/bin/svnlook.real
    b) create shell scripts:
    umask 002
    /usr/bin/svnserve.real "$@"
    umask 002
    /usr/bin/svnadmin.real "$@"
    umask 002
    /usr/bin/svnlook.real "$@"
    c) assign permissions to shell scripts:
    $ sudo chmod +x /usr/bin/svnserve /usr/bin/svnadmin /usr/bin/svnlook
    4) Create the repository:
    (/var/svn is just one possible place to put it, right? what's a recommended location?)
    $ sudo svnadmin create /var/svn
    5) Assign ownership of the repository to a user in the "svn" group:
    (Presumably if you create the repository in an area that isn't owned by root, you can just run svnadmin as the svn user instead of using sudo and reassigning ownership, right?)
    $ sudo chown -R svn:svn /var/svn
    6) Add users who should be able to use SVN to the svn group:
    $ sudo pico /etc/group
    7) Create SSH keys for all users who should be able to use SVN:
    ummm.... ask your friendly neighborhood sysadmin?

    Log in...:
    How do I get SVN to recognize the hostname? Can I just use any host whose A record resolves to any IP assigned to the box?

    From remote machine:
    $ svn list svn+ssh://HOSTNAME/var/svn/projectname
    So... is anything here wrong? Is anything missing? (BTW, this is on a Centos VPS running cPanel, if that affects anything.) Suggestions are very very much welcomed!


    (Once I get this worked out, maybe I'll write it up as a "for dummies" -- would anyone find that useful?.)

  • #2
    Please? Anyone?


    • #3
      svn server setup with ssh auth


      A note book for dummies would help alot thanks

      Im pretty new to svn aswell and have been on top of it for about 2 weeks and have also had major conflicts as googling just confuses me more

      Did you manage to set it up?

      Im having problems setting up a svn+ssh auth

      I see that many sites state that svnserve must be available through ssh, "ssh svnserve" is used to check .. in my case it seems its not so i must either place /usr/local/bin into the PATH variable or create symlinks of your binaries to the /usr/sbin directory or any other directory which is commonly in the PATH.

      Is someone able to explain this to me please

      Why do you need wrappers for?

      in need of help i thank you