Git/Gitolite Application Learning

Source: Internet
Author: User

Git/Gitolite Application Learning

I have previously written svn-related configuration and Learning (see). We are currently using svn. Most of them are used for development, and the permissions are also allocated in a very fine manner. Therefore, you do not need to perform too many operations. In terms of backup, in addition to script backup, there is also shared storage. So there is no problem.

Take a few days to learn about Git, In case you will use it later. The benefits of Git will not be mentioned here. It can be listed much better than svn. On the other hand, git and github are well integrated. You should also learn about this.

Since the previous svn used fine-grained permission control, we can learn it together with Gitolite. Therefore, it is divided into server and client.

I. Client:

In Linux, you do not need to install it. If you want to run the command, check it. If you want to run the command on git, it is OK if you do not report an error. Install git without yum. Download the installation package from the official website on windows and click "OK" next. Git Official Website: If you can't open the http://git-scm.com/download/, you know ......

If the installation is OK in Windows, a command line tool for Git Bash will be available. Click here:

If it runs normally, we will generate a key for future git management. I have already generated it, so the command will not be executed here. Run ssh-keygen-t rsa and press enter to generate a key in the current user's home directory.

Now you need to rename the Public Key (to facilitate user identification) and upload it to the server where you want to install Git for authentication.

So far, the client can do so much. For Linux clients, the same operation is true. It is more convenient.

Ii. Server:

Currently, CentOS6 has been integrated with Git, so you do not need to install Git, but you need to install Gitolite.

# Cat/etc/issue
CentOS release 6.2 (Final)

# Rpm-qa git
Git-1.7.1-2.el6_0.1.x86_64

# Creating a repository directory
# Mkdir/src/project-pv

# Create a git user to manage git
# Useradd git

# Create a warehouse link to the Home Directory
# Chown-R git. git/src
# Su-git
$ Ln-sv/src/project/home/git/repositories

# Clone gitolite Repository
$ Git clone git: // github.com/sitaramc/gitolite
$ Pwd
/Home/git/gitolite
$./Install -- help # You can view the installation parameters and other information.
$ Mkdir ../bin # create a bin directory in the home directory to install
$./Install-to/home/git/bin/# Is the src directory under the cp directory

# Using the public key to create an initialized version Library
$ Gitolite setup-pk/tmp/chenfeng. pub
Initialized empty Git repository in/src/project/gitolite-admin.git/
Initialized empty Git repository in/src/project/testing. git/
# This indicates the operation is successful.
$ Pwd
/Home/git/repositories
$ Ls
Gitolite-admin.git testing. git # You can see two directories, one account managed, one tested

# Now the client can clone the version library and perform user management and code writing.

Before the version is checked out, we can test whether ssh public key authentication is successful:

The above information. It indicates that ssh public key authentication is normal. It also shows which databases have any permissions. Otherwise, check.

-------------------------------------- Split line --------------------------------------

GitHub Tutorials:

GitHub tutorials

Git tag management details

Git branch management

Git remote repository details

Git local Repository (Repository) Details

Git server setup and Client installation

Git Overview

Share practical GitHub tutorials

-------------------------------------- Split line --------------------------------------

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • 3
  • Next Page

Related Article

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.