使用gitea自建git服务
安装git和sqlite apt install git sqlite3 -y 安装gitea 下载地址在此 https://dl.gitea.com/gitea/ wget -O gitea https://dl.gitea.com/gitea/1.19.3/gitea-1.19.3-linux-amd64 chmod +x gitea mv gitea /usr/local/bin/gitea 添加git用户 adduser --system --group --disabled-password --shell /bin/bash --home /home/git --gecos 'Git User' git 新建目录 mkdir -p /var/lib/gitea/{custom,data,log} chown -R git:git /var/lib/gitea/ chmod -R 750 /var/lib/gitea/ mkdir /etc/gitea chown root:git /etc/gitea chmod 750 /etc/gitea chmod 640 /etc/gitea/app.ini export GITEA_WORK_DIR=/var/lib/gitea/ 设置systemd服务 ## 备份链接 https://unixetc.com/res/gitea.service wget https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service cp gitea.server /etc/systemd/system/gitea.service sudo systemctl enable gitea sudo systemctl start gitea 配置gitea 通过http://ip:3000来访问gitea web进行初始配置。 ...