Set up SVN servers in Ubuntu and create SVN + SSH clients in Windows

Source: Internet
Author: User
Tags addgroup svn client tortoisesvn

Set up the svn server in Ubuntu and create the svn + SSH client in Windows:

1. Install SSH
Sudo apt-Get Install SSH
2. Install Subversion
Sudo apt-Get install Subversion
3. create user accounts for members involved in project development
Sudo adduser user1
4. Create a user group named SVN
Sudo addgroup SVN
Sudo addgroup user1 SVN/* Add user1 to the group SVN */
Note: multiple user groups can be created based on different permissions, and users with corresponding permissions can be placed in the corresponding group.
5. Create a project file storage directory
Sudo mkdir/usr/local/SVN
Sudo mkdir/usr/local/SVN/trunk
6. Create a SVN File Repository
Sudo svnadmin create/usr/local/SVN/trunk
7. grant corresponding permissions to members of the group
Sudo chown-r root: SVN/usr/local/SVN/trunk
Sudo chmod-r g + RWS/usr/local/SVN/trunk/* grant the read and write permissions to the svn group. You can change the corresponding permissions as needed */
Sudo chmod-R o-rwx/usr/local/SVN/trunk
/* Delete the read, write, and execute permissions of other irrelevant persons. By default, other persons may have read permissions */
Note: You can view related Linux commands for permission modification issues.
8. Generate a key pair for each member (take user1 as an example)
Switch to Xiao User Logon: su user1 (prompt to enter user1 password)
Input: Cd ~ /
Input: whoami. If logon is successful, Xiao is displayed.
Run: SSH-keygen-B 1024-T DSA-N passphrase-F user1key
Note: passphrase is the key keyword. Modify xiaokey as the file name based on your needs. Here we use DSA encryption. You can use RSA encryption instead.
Change "DSA" to "RSA.
At this time, two files are generated: xiaokey and xiaokey. Pub. The first one is the secret key and the other one is the public key.
Create the directory/home/Xiao/. SSH and copy the public key to the/home/user1/. Ssh Directory: CP user1key. Pub
/Home/user1/. Ssh/authorized_keys
Note: The file name must be authorized_keys.
Exit: Exit
9. To install the svn client in windows, install "tortoisesvn", "puttygen", and "Pageant"
9.1 download:

Http://sourceforge.net/projects/tortoisesvn

Http://www.chiark.greenend.org.uk /~ Sgtatham/Putty/

9.2 installation: omitted
9.3 convert Private Key format:
9.3.1 run puttygen;
9.3.2. Choose conversions> gennery,
9.3.3 select the file user1key and the prompt "Enter passphrase
Key ", enter the passphrase keyword used to create a public/private key pair,
9.3.4, then select parameters as SSH-2 DSA (if the public key is generated using RSA, select SSH-2 RSA "),
9.3.5. Click Save private key,
9.3.6. Save the file name as user1key. PPK.
9.4 establish the association between tortoisesvn and pageant, and add the private key to pageant:
9.4.1 right-click tortoisesvn-> Settings-> network-> SSH client, and enter:
C:/program files/tortoisesvn/bin/tortoiseplink.exe;
9.4.2 right-click tortoisesvn-> repobrowser and enter the URL:
SVN + SSH: // user1 @ svnserviceip/usr/local/SVN/trunk;
9.4.3 run pageant, right-click the icon in the lower-right corner of the screen-> Add key, and add the private key file user1key. PPK.
I think this configuration is safe to operate between servers, but it is not convenient for developers (developed in Windows) to use it. We can use another SSH client.
Sesure shell is better and can be well managed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.