如何搭建一个 Git 版本控制服务端?

Gogs 下载和安装 https://github.com/gogits/gogs

# 下载二进制压缩包 不检查服务器证书
root@cheungxiongwei:~# wget --no-check-certificate  https://github.com/gogits/gogs/releases/download/v0.11.34/linux_amd64.tar.gz

# https://dl.gogs.io/0.11.34/linux_amd64.tar.gz

# 下载二进制压缩包 检查服务器证书
root@cheungxiongwei:~# wget --secure-protocol=sslv3  https://github.com/gogits/gogs/releases/download/v0.11.34/linux_amd64.tar.gz

# 解压 gz 压缩包
root@cheungxiongwei:~# gzip -d linux_amd64.tar.gz
root@cheungxiongwei:~# tar -xf linux_amd64.tar

# 运行
root@cheungxiongwei:~/gogs# ./gogs web

# 访问该服务器地址 3000 端口,进行初始化配置即可。

# dos 设置代理
set http_proxy=http://127.0.0.1:1080
set https_proxy=https://127.0.0.1:1080

set http_proxy=socks5://127.0.0.1:1080
set https_proxy=socks5://127.0.0.1:1080
# 格式
set ALL_PROXY=socks5://127.0.0.1:1080

set http_proxy=http://proxyAddress:port
set http_proxy=http://userName:password@proxyAddress:port


# vscode proxy
// Place your settings in this file to overwrite the default settings
{
 "http.proxy": "http://127.0.0.1:1080",
 "https.proxy": "https://127.0.0.1:1080",
 "http.proxyStrictSSL": false
}

# git 设置代理

#设置全局代理(一般设置单个项目代理即可)
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

#删除代理设置
git config --global --unset http.proxy
git config --global --unset https.proxy

#查看当前代理设置
git config --global --get http.proxy
git config --global --get https.proxy


# 后台运行
root@cheungxiongwei:~/gogs# nohup ./gogs web &

# 不输出日志
nohup ./gogs web >/dev/null 2>&1 &

# 查看后台任务
root@cheungxiongwei:~/gogs# jobs
原文地址:https://www.cnblogs.com/cheungxiongwei/p/8546945.html