Then yesterday's live, we wrote the markdown file to be transferred to the ./_posts/folder, and then generated by jekyll, so we need to use git to help us synchronize files. (Of course ftp/sftp/rsync can also, but with git I heard that it can be installed 13) First, you need to set up a git repository gitosis on vps. 1. Install python-setuptoolswget https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.7.tar.gztar zxvf setuptools-1.1.7.tar.gzcd setuptools-1.1.7python setup. Py buildpython setup.py install
2, install gityum -y install git
3, install gitosisgit clone https://github.com/tv42/gitosis.git #Get the latest gitosiscd gitosis # Go to the gitosis folder python setup.py install
4, generate rsa public key and private key ssh-keygen -t rsa #generate key, all the way back, no password cp ~/.ssh/Id_rsa.pub /tmp/id_rsa.pub #Copy the public key .pub file to the tmp folder
5, initialize gitosisuseradd git #add git user su - git #switch to git user for gitosis- Init < /tmp/id_rsa.pub #just put id_rsa.pub in the /tmp directory. The main reason is that rm /tmp/id_rsa.pub #OK, id_rsa.pub has permissions for everyone in this directory. It can be deleted.
6, get and configure gitosis administrator su - root #Switch back to root user git clone under root git@localhost:gitosis-admin.git #次Steps if error You can use the following #git clone git@localhost:/home/git/repositories/gitosis-admin.git
The configuration of gitosis is basically complete, gitosis-admin/gitosis.conf is the repository configuration file. You need to add a new project or modify the project corresponding to the user to modify it.
The following are some practical examples:
Add a lalala project in the git repository, the project member is test
First modify the gitosis-admin/gitosis.conf file in the file Join later: [group group name] writable = project name # is generally the name of the code library to be created members = member name # member name must be consistent with the .pub public key in the keydir folder; can have multiple members, with spaces Splitting
The group name is free, the project name is filled with lalala, the member is filled with test, and the save is exited.
Push the configuration file into the repository. git add .git commit -am "add project lalala"git push git@localhost:gitosis-admin.git master
Assume member test is in another To use the machine, first generate ssh-keygen -t rsa on that, put the generated id_rsa.pub into the gitosis-admin/keydir directory above, and rename it to test.pub (the file name is consistent with the member name. Pub cannot be omitted). Then git push again, then test has access to the project lalala.
Then execute on the local machine of test: mkdir lalalacd lalalagit inittouch test.txtgit add .git commit -am "add test.txt"git push git@your-gitosis-server:lalala.git master
test will build the lalala project locally.
As for multiple users accessing a project, just add the name in gitosis.conf and put the corresponding id_rsa.pub into the keydir.
If you want to execute system commands after git push is complete, you can use the hook function.
More usage please google--
nmap is a network port scanner. Its main function is to check a group of target hosts to see which
There is no new concept in this article. We just use command line tools to repeat what we have done
First time when the basic network configuration is 1. Check the network mac address first[root@cento
In different Linux distributions, there will be different GUI programs that can display various syst
Linux command lsof use tutorial
Introduction to linux environment variables
Linux prompt No such file or directory solution
Centos6.5 install jdk1.7 detailed steps
How to fix GRUB boot in Linux system
Modify the Ali cloud Linux VPS host username method
Set the script to self-starting under Linux system
Overview of the Log File System in Linux System
Linux common tips: teach you the same network card configuration multiple IP
Small way to adjust the size of the Windows 8 taskbar icon
How does the Win10 system open the Aero transparency effect?
Windows10 free upgrade booking process Upgrade win10 booking tutorial
How many key processes in WinXP system
Win10 version of "Sparta" will be equipped with "previous advanced features"
How does the Win10 system temporarily disable Microsoft Xiaona because she does not speak Chinese
Win10 bios can't get in how to do
The most important upgrade points for 10 Microsoft WP8.1 users
What should I do if the Windows 7 system pops up the igfxsrvc.exe window?