Files
macos-tools/ai/cursor/git-proxy-fix.sh
bruno 6ebfb24fd9 fix: Update runner Docker socket configuration and Gitea instance URL
- Changed docker-compose.yml to mount OrbStack Docker socket path (/Users/brunogao/.orbstack/run/docker.sock)
- Updated GITEA_INSTANCE_URL to use 192.168.1.83:33000 instead of gitea:3000 for proper DNS resolution
- Both runner-docker and runner-k8s now correctly point to OrbStack Docker daemon
- This resolves the 'Cannot connect to the Docker daemon' error and DNS resolution failures
2025-11-13 17:59:28 +08:00

11 lines
719 B
Bash
Executable File

#!/bin/bash
# Git代理修复脚本
PROXY="http://127.0.0.1:7890"
check_proxy(){ lsof -i :7890 >/dev/null 2>&1; } # 检查代理是否运行
unset_proxy(){ git config --global --unset http.proxy && git config --global --unset https.proxy && echo "✅ 已取消git代理设置"; } # 取消代理
set_proxy(){ git config --global http.proxy "$PROXY" && git config --global https.proxy "$PROXY" && echo "✅ 已设置git代理: $PROXY"; } # 设置代理
case "$1" in
off) unset_proxy;; # 取消代理
on) set_proxy;; # 设置代理
*) if check_proxy;then echo "✅ 代理服务运行中 ($PROXY)";else echo "❌ 代理服务未运行,正在取消git代理设置..." && unset_proxy;fi;; # 自动检测并修复
esac