passwd git
Then, create a project warehouse storage point under the/home directory, and set the GIT user to have all permissions, without any permissions from other users.[SQL]View Plaincopyprint?
ubuntu:/tmp/gitosis$ sudo mkdir/home/gitrepository
ubuntu:/tmp/gitosis$ sudo chown git:git/home/gitrepository/
ubuntu:/tmp/gitosis$ sudo chmod 700/home/gitrepository/
Because Gitosis wi
public key and a private key file. Copy the public key file to the server. After being imported to gitosis on S1, C1 can connect to the server through SSH without the user name and password.
scp /home/chenshu/.ssh/id_rsa.pub cncm@S1:/home/cncmsudo -H -u git gitosis-init
The following result is displayed:
Initialize empty gi
the project./home/gitrepository. [SQL] View Plaincopyprint?On code , view the snippet that derives from my code slice ubuntu:/tmp/gitosis$ sudo ln-s/home/gitrepository/home/git/repositories Here I will generate an SSH public key on the server side, and if I want to manage it on another machine, I can generate an SSH public key on the other machine. [SQL] View Pl
line:Yourname:.ssh git$ open-e Authorized_keysWe then give the post-update a writable permission so that the client can commit the changes.Yourname:gitosis git$ sudo chmod 755/users/git/repositories/gitosis-admin.git/hooks/post-updatePassword:Yourname:.ssh git$ CD ~yourname
convenient. For example: Right-click under D:\hjj-repo10) TestingEnter "Git version" in the command line that appears, the following content is the installation success;1.2.2Gitblit Installation1) Direct decompression, catalogue optional;2) configuration gitblit.properties;A. Path: Gitblit directory/data/gitblit.properties, "notepad" open;B. Locate the Server.httpport, set the port number for the HTTP protocol (e.g. 7070)Server.httpsport, set the por
the server, downloaded to the client.
Enter the ~/.ssh directory and use Ssh-keygen to generate the public key:
Cd/home/git/.sshSSH-KEYGEN-T RSANote the password for the private key cannot be forgotten. The ~/.ssh/id_rsa.pub public key file is generated by default.
Once you have the key, you can initialize the gitosis to allow Gitosis to gain administrative rights over
1, gitblit installation1.1, Gitblit introductionThe Git is well-liked by programmers in the area of version control. For open source projects, can be hosted free of charge to github above, quite convenient. But private project hosting to github will charge quite an expensive fee. Also some enterprises, units developed in the LAN, then how to use git code version control it? We can build our own
Git is an open source distributed version control system that can efficiently and efficiently handle project versioning from very small to very large. Allows developers to clone (git clone), copy a full git repository on the local machine, or commit the code to a git server.First, the environmentVMware creates an Ubu
default user again
$ Exit
If you will be the administrator of the GIT server, generate an SSH public key on your computer (another PC:
USR @ pC1 :~ $ Ssh-keygen-T RSA
Copy the public key to/tmp on the server:
USR @ pC1 :~ $ SCP. Ssh/id_rsa.pub git @
Go back to the GIT
+ N3wEAQRYDmcYo1wmnm/cores + cores = leo @ LEO-PC
Note: I have three users logging on to the server, so I have three ssh-rsa users. You can check them out.
4. initialize the Git Repository
Note: select a directory as the Git repository. Here is/data/git/project. git.[Root @
+eN3wx2aeztdevxu9plggtG05SMmd8GNVzXrN1IaxXSvz0UwjQ2kygu7aCqO8AZWH49rouw== leo@LEO-PC
Note: I have three users logging on to the server, so I have three ssh-rsa users. You can check them out.
4. initialize the Git Repository
Note: select a directory as the Git repository. Here is/data/git/project.
need to add executable permissions to a file:$ Sudo chmod 755/opt/git/gitosis-admin.git/hooks/post-Update
We have created an empty project warehouse on the server for testing. I have created a warehouse named "teamwork.Switch to git User:$ Su-Git$ CD/opt/
server and client. When operating git, you need to switch to the git user==================== Git server configuration ==================================Server: Install git tool [root]
code to the remote repository. Pull is the time to download the code from the remote repository to the local repository.The Code warehouse uses version pointers for the storage of the code, and each submitted version corresponds to a head pointer, and the current version pointer changes as the code commits.Two automatic deployment principlesTell us about the distribution of the code now, the local repository on the developer's computer, the remote repository on the
three users logging on to the server, so I have three ssh-rsa users. You can check them out.
4. initialize the Git Repository
Note: select a directory as the Git repository. Here is/data/git/project. git.
[root@git ~]
# cd /data/
inherits the spirit of the open source community and does not support permission control. However, because Git supports hooks, it is possible to write a series of scripts on the server side to control the commit and so on, to achieve the purpose of permission control. Gitolite is the tool. we don't even introduce it
/some_project.git ' to the local some_project directory
Git init and git remote: This is a little more complicated, when you create a working directory locally, you can access this directory and use ' Git Init ' command to initialize, Git will later version control of the files in the directory, this time if you need
source community and does not support permission control. However, because git supports hooks, it is possible to write a series of scripts on the server side to control the commit and so on, to achieve the purpose of permission control. Gitolite is the tool. Here we also do not introduce gitolite, do not waste the lim
community and does not support permission control. However, because git supports hooks, it is possible to write a series of scripts on the server side to control the commit and so on, to achieve the purpose of permission control. Gitolite is the tool.Here we also do not introduce gitolite, do not waste the limited lif
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.