如何搭建一个 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

# 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值