使用Gogs搭建Git私仓——Ubuntu上Gogs安装与配置

使用Gogs搭建Git私仓——Ubuntu上Gogs安装与配置

https://blog.csdn.net/beta___/article/details/142519176

使用Gogs搭建Git私仓——Ubuntu上Gogs安装与配置_ubuntu gogs安装-CSDN博客

https://blog.csdn.net/hktkfly6/article/details/138459500

在Ubuntu 上安装Gogs Git服务

 

 

stevenroc@stevenroc:/opt/openAI/software $

一、

sudo apt update && sudo apt upgrade -y

二、

sudo adduser git

password:XXXXXX

 

steven_roc

xiaocao1688W

steven_roc@126.com

 

stevenroc@stevenroc:/opt/openAI/software $ sudo adduser git

Adding user `git’ …

Adding new group `git’ (1001) …

Adding new user `git’ (1001) with group `git (1001)’ …

Creating home directory `/home/git’ …

Copying files from `/etc/skel’ …

New password:

Retype new password:

passwd: password updated successfully

Changing the user information for git

Enter the new value, or press ENTER for the default

       Full Name []:

       Room Number []:

       Work Phone []:

       Home Phone []:

       Other []:

Is the information correct? [Y/n] y

Adding new user `git’ to supplemental / extra groups `users’ …

Adding user `git’ to group `users’ …

三、

sudo adduser git sudo

sudo adduser git

Adding user `git’ …

Adding new group `git’ (1001)

cd  /opt/openAI/software

tar -zxvf gogs_0.13.0_linux_armv8.tar.gz

 gogs 目录内容移动到 /home/git 

stevenroc@stevenroc:/opt/openAI/software $ sudo mv gogs /home/git/

 /home/git/ 的所有权更改为 user.git

stevenroc@stevenroc:/opt/openAI/software $ sudo chown -R git:git /home/git/

stevenroc@stevenroc:/opt/openAI/software $ sudo nano  /etc/systemd/system/gogs.service

 sudo nano  /etc/systemd/system/gogs.service

 

[Unit]

Description=Gogs Git Service

After=network.target

 

[Service]

User=git 

Group=git

WorkingDirectory=/home/git/gogs

ExecStart=/home/git/gogs/gogs web

Restart=always

 

[Install]

WantedBy=multi-user.target

stevenroc@stevenroc:/opt/openAI/software $ sudo systemctl daemon-reload

stevenroc@stevenroc:/opt/openAI/software $ sudo systemctl start gogs

十一

stevenroc@stevenroc:/opt/openAI/software $ sudo systemctl enable gogs

Created symlink /etc/systemd/system/multi-user.target.wants/gogs.service /etc/systemd/system/gogs.service.

十二

stevenroc@stevenroc:/opt/openAI/software $ sudo systemctl status gogs

 

 登陆web页面

您可能还喜欢...

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注