set up under ubuntu svn server and establish svn + ssh client in windows

set up under ubuntu svn server and establish svn + ssh client in windows:

1, install SSH
sudo APT-GET install SSH
2, install Subversion
sudo APT-GET install Subversion
3, to create a user account for the members to participate in the project development
sudo adduser user1
4, the establishment of a user group named svn
sudo addgroup svn
sudo addgroup user1 svn / * user1 join the group svn * /
Note: here you can create multiple user groups according to different permissions, the user has the appropriate permissions into the appropriate group
5, the establishment of the project file storage directory
sudo mkdir / usr / local / svn
mkdir sudo / usr / local / svn / Trunk
6, create a file sVN repository
sudo svnadmin the create / usr / local / svn / Trunk
7, given the appropriate permissions for group members
sudo chown -R root: svn / usr / local / svn / Trunk
the sudo the chmod + G -R & lt RWS / usr / local / svn / Trunk / * read and write access to the svn group given, the appropriate permissions can be changed as needed * /
the sudo the chmod -R & lt O-rwx / usr / local / svn / Trunk / * delete other unrelated persons read, write, execute permissions, default is possible that other people have read access to the case * /
NOTE: For permission to modify questions can view the linux command
8, generated for each member of the key pair (user user1 for example)
switch to xiao user login: su user1 (user1 prompted to enter the password)
Enter: cd ~ /
enter: whoami, if the login is successful is displayed xiao
executed: ssh -keygen -b 1024 -t dsa -N passphrase -f user1key
Note: One key passphrase for the key, modified according to your needs, xiaokey the file name; used here is DSA encryption, you can use RSA encryption, to which the "dsa" changed to "rsa" on it.
Then create two files: xiaokey and xiaokey.pub, after a former secret key is a public key
and then, create a directory /home/xiao/.ssh, copy the public key to /home/user1/.ssh directory next: cp user1key.pub /home/user1/.ssh/authorized_keys
Note: the file name must be authorized_keys
exit: exit
9, install the svn client in windows, you need to install "TortoiseSVN", "puttygen" and "Pageant"
9.1 download:
http://sourceforge.net/projects/tortoisesvn
http://www.chiark.greenend.org.uk/~sgtatham/putty/
9.2, install: slightly
9.3, the private key format conversion:
9.3.1, run puttygen;
9.3.2, select the menu conversions-> gennery,
9.3.3, select the file user1key, prompt "Enter passphrase for key", to create a public and private key to enter the passphrase to use keywords show,
9.3.4, and then select the Parameters of "SSH- 2 DSA "(if using RSA public and private key is generated, then select" SSH-2 RSA "),
9.3.5, Private Key click of a button the save,
9.3.6, save the file named user1key.ppk.
9.4, TortoiseSVN with Pageant association, and private join Pageant:
9.4.1, the right mouse button to select TortoiseSVN-> Settings-> Network-> SSH client , enter:
C: / Program Files / TortoiseSVN / bin / TortoisePlink.exe ;
9.4.2, the right mouse button TortoiseSVN-> RepoBrowser enter the URL of:
svn + SSH: // user1 @ SvnServiceIP / usr / local / svn / Trunk;
9.4.3, run Pageant, right-click on the bottom right of the screen icon -> Add Key, the private key file user1key.ppk added.
I think this configuration between the server operation is relatively safe, but for developers (developed under the window) and it is not convenient to use, and we can use a different client ssh ssh sesure shell end is better, you can take management.   

Reproduced in: https: //my.oschina.net/dake/blog/196858

Guess you like

Origin blog.csdn.net/weixin_33883178/article/details/91586401