Build a git server under CentOS

Source: Internet
Author: User
Tags ssh access

Get ready

CentOS Linux release 7.0.1406 (Core)

SSH 22 Port

HTTP 80 Port

This article is mainly SSH protocol support, HTTP protocol configuration after the problem.

Excerpt of a paragraph of explanation

SSH protocol

Setting up a Git server often uses the SSH protocol as the transport Protocol. Because SSH access is already supported in most environments-it's not easy to set up on the fly. SSH protocol is also a authentication authorization network protocol, and because of its universality, erection and use are easy.

To clone the repository via the SSH protocol, you can specify a ssh://URL:

clone ssh://[email protected]/project.git

Or use a short, SCP-style notation:

$ git clone user@server:project.git

You can also not specify the user, Git will use the currently logged in user name.

Advantage

There are many advantages to using the SSH protocol. First, SSH is relatively simple--ssh daemon is common, most administrators have experience, and most operating systems contain it and related management tools. Second, access via SSH is secure-all transmitted data is authorized and encrypted. Finally, like the HTTP/S protocol, the Git protocol, and the local protocol, the SSH protocol is efficient and compresses the data as much as possible before it is transmitted.

Disadvantages

The disadvantage of the SSH protocol is that you cannot achieve anonymous access through him. Even if you read the data, the user has access to your host via SSH, which makes the SSH protocol detrimental to open source projects. If you only use the company network, the SSH protocol may be the only protocol you need to use. If you want to provide both anonymous read-only access and SSH protocol, you have to set up a service that allows others to access it, in addition to setting up an SSH service for yourself.

2016-10-26 Add, SSH does not have HTTP access convenience, has been replaced by Gitlab implementation, but also good, reference official website documents can

Build a git server under CentOS

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.