2. Clone and install from Gitosis Project homepage
It is possible that your clone failed to report a socket connection failure
Then you can go to the GitHub Project homepage clone
However, cloning the GitHub home page also error, you need to use commands on your machine to ssh-keygen
generate the public and private keys, and then posted to github up.
Publish the generated public key to GitHub (you have to have a GitHub account).
Add effect after success
Cloning again no problem
Install several tools for gitosis use
3. Initialize Gitosis
Create a user to manage our Gitosis project (GitHub home page has a description of this piece, different versions of Linux create users are not the same)
Switch to the root user and add the git user
Initializes the gitosis. It is important to note that managing our Gitosis project requires an administrator who needs to publish his or her SSH public key to this server. For example, I upload my mac user's public key to the server.
Initializes the gitosis. Note The Gitosis Project home page describes some of the differences that we actually perform.
Once the initialization is successful, you can install and manage our project. For example, I use a Mac user to clone the Gitosis project first
This is Gitosis's project manager: Chenghuiyong
4, Configuration Gitosis
We continue to add a project, members or myself, to allow read and write.
Pushed to the remote repository.
Configuration file, We have added a new project: Api.chehubao.com, now we need to do is to create a local api.chehubao.com directory, initialize the project, and then associate with the remote warehouse, push to the remote (here push to note that the local warehouse must have content to push the success of the , while pro Git is wrong in this book)
Pushed to the remote repository, it is automatically created by default if it is not remotely.
Log in to the server to see if the project was created
At this point, the GIT server Setup and project, permissions, user management has ended. Before writing this article, I have checked a lot of information, practice many times, also encountered a lot of difficulties. The information on the web is always incomplete, and at the end of the paper, a comparison of the different materials and official documents summarizes this blog post.
Our current company projects are also all based on git, using gitosis authorization. At the same time, we continue to accumulate git-flow experience, next, I will be based on the actual project experience, share an article on how to effectively use the Git-flow process in the team Project development blog, If you like please follow me on my blog: www.chenghuiyong.com
Reference Resources
- Http://git.oschina.net/progit/4-%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E7%9A%84-Git.html
- Https://github.com/res0nat0r/gitosis
Install Git services & use Gitosis to manage members, projects, and project authorizations (bottom)