CentOS 7 Installation gogs git code server

Source: Internet
Author: User
Tags docker ps docker run
This is a creation in Article, where the information may have evolved or changed.

The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/51089323 not allowed to reprint without the Bo master.
Bo main address is: Http://blog.csdn.net/freewebsys

1, about Gogs

Open source code Server The most bull is GitHub, there is an open source implementation is gitlab.
But Gitlab is written in Ruby and sometimes has a problem with performance.
Sometimes it's super slow when you use it. The problem arises when the code is stored more.
I wonder if gogs will have this problem. So try.
The official website is: https://gogs.io/


The code is on GitHub. More than 1300 shares.

2, installation steps

Https://gogs.io/docs/installation
I am using the simplest Docker installation. You can install Docker in the Centos7 direct install. SOURCE inside there.

install docker

Otherwise need to install MYSQL,GIT,SSH and other services, but first toss under, don't want too much trouble. Even binary installations have a 15MB size.
Https://github.com/gogits/gogs/tree/master/docker

Create local directory for volume.$ mkdir -p /var/gogs# Use `docker run` for the first time.$ docker run --name=gogs -p 10022:22 -p 10080:3000 -v /var/gogs:/data gogs/gogs# Use `docker start` if you have stopped it.$ docker start gogs

With Docker PS You can see the service:

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                            NAMESa42d410293e4Gogs/gogs"Docker/start.sh/bin"    -Seconds ago up 8Seconds0.0. 0. 0:10022- A/TCP,0.0. 0. 0:10080- the/tcp Gogs

Then there was the wait, which was written about the use of Docker's domestic image:
http://blog.csdn.net/freewebsys/article/details/50888878
Need to register Daocloud account and set the next source.

3, install Gogs

Enter the IP and port of the Docker host (default port 10080): http://192.168.1.8:10080/
For simple installation, use the Sqlite3 database. You should normally use Docker to install a MySQL service and then configure the username password.

Default configuration, note Be sure to write on the server IP or domain name.

You can not create an administrator user, the default first user is the administrator.
However, the Admin user is not available.

Created a gogs user, this is the administrator.
The data is under the/var/gogs/directory above the host, and if you need to reinstall it, clear the directory and restart the Gogs Docker image.

4, testing the GIT service

Create a project:

Download and then submit a file:

# git clone http://192.168.1.8:10080/gogs/gogs.git# Touch Readme.md# git add readme.md# git commit-m "first commit"# Git push-u Origin masterIf you do not have SSH configured, you will need to enter your username password: Username for ' http://192.168.1.8:10080 ': Gogspassword for ' http://gogs@192.168.1.8:10080 ': Counting objects:3, done. Writing objects: -% (3/3),206bytes |0BYTES/S, done. Total3(Delta0), reused0(Delta0) to http://192.168.1.8:10080/gogs/gogs.git* [NewBranch] Master, Masterbranch MasterSetUp-to-track remote branch master from Origin.

Then the empty file is uploaded!!

5, summary

The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/51089323 not allowed to reprint without the Bo master.
Bo main address is: Http://blog.csdn.net/freewebsys

The Gogs code is very small and the binary code is 18MB. Very fast.
Without too much redundancy, comparing Gitlab is still a little bit rough. But this is not a problem, the more features more problems, as long as a good git services on the line, the other fancy things are useless.
The code hosting service is enough, no Gitlab before the code is placed on the SVN server without a visual interface, as long as the configuration file is not used.
Already very good, fast, enough stability on the line, the others are clouds.

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.