init/init-git.sh
Martin 9eda3ac981
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 22m24s
[+] 历史版本兼容
2025-01-13 21:12:49 +08:00

11 lines
299 B
Bash

#!/bin/bash
# 检查 git 是否安装
if command -v git > /dev/null 2>&1; then
echo "git 已安装,正在配置镜像源..."
git config --global url."https://git-proxy.hk.martin98.com/".insteadOf "https://"
echo "镜像源配置完成。"
else
echo "git 不存在,跳过..."
fi