Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    863102296

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

At work, we need to submit our own code or project to our repository. Commonly used repositories include github gitee, etc. How to build your own private git repository?

About Gogs

Gogs, full name Go Git Service, is a Git service developed based on the Go language. It provides an interface and features similar to GitHub, allowing you to build a private Git repository and code hosting platform (similar to gitlab) on your own server. Its design and performance optimization make it suitable for small teams and individual developers. It has a web interface that allows you to easily manage and browse repositories, handle issues, conduct code reviews, and manage team members.

v5msd3xfgru390.png

Features

Open Source Free: Gogs is released under the MIT license and can be used, modified and distributed for free. Lightweight: Gogs is written in Go, easy to deploy and run, and consumes less memory in terms of resource consumption. Fast and Stable: Gogs uses some performance optimization measures to improve its response speed and stability. Easy to use: Gogs has an intuitive user interface that allows users to quickly get started and perform version control and collaborative development. Integrated features: Gogs supports some common features, such as problem tracking, code review, web hooks, etc. Multiple database support: Gogs can be integrated with a variety of common databases, including SQLite, MySQL, PostgreSQL, etc. Support extensions: Gogs has a rich plug-in system that allows users to customize extensions according to their needs.

Installation

Here we take centos7 as an example to install it.

First, we need to install the mysql database. If the database is installed, just create the corresponding database.

Here we use the simplest yum command to install it

wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm

rpm -ivh mysql57-community-release-el7-8.noarch.rpm

cd /etc/yum.repos.d/

yum install mysql-server --nogpgcheck installation, start the database

systemctl start mysqld 5ti4qpzoxjj400.png

Get temporary password

grep 'temporary password' /var/log/mysqld.log oi020vavg0z409.png

Log in with the temporary password you just obtained

mysql -u root -p efne4ggyxl3418.png

Modify the root password

set password for root@localhost=password('666');ex Next, we create a database

create database git; At this point, the database configuration is completed. If yours is in a pagoda environment, just create a database in the pagoda.

Installing gogs

First go to the official website to download the binary package according to the corresponding system version fbwhkwne2sc431.png

wget https://dl.gogs.io/0.13.0/gogs_0.13.0_linux_amd64.zip

unzip gogs_0.13.0_linux_amd64.zipls

After the ./gogs web is completed, visit ip:3000 to enter the installer.e5az024cdk5441.png

u42euzq1ecd453.pngFill in database information 4p1g5t4yuvq462.pngBasic configuration information ibpozjqm1bc470.pngFill in pit errors and cannot be recognized 'git' command: exec: 'git': executable file not found in $PATH

We need the yum command to install git.

yum install git create account information i0m0gyp0hin484.png

After the configuration is complete, click Install Now. Wait for completion effect rsbnrasxag0551.png

Login fhi4fkl1oit579.png

Create your own repository

25gfhnoonfi619.png oomomsbpsid639.png

Push local project to Gogs repository

Here, let's take idea as an example

IDEA opens an ready-made project and adds gogs remote repository 5yhkoabczxo642.png u4tfqho0ppy672.png

After clicking OK, wait for download and install git.

After the installation is completed, the git menu bar will appear and click Manage Remote Address.1pyixjh5bi1696.png jyq2ja1tvgy731.png

Synchronous Code

Select the project document - right-click git - submit and push yxwofbgxwn4740.png patklbolrco749.png gxtujy2kk3v793.png

At this point, we have configured our own private repository.