diff --git a/00-init-tools.sh b/00-init-tools.sh index 6843769..595f9d6 100755 --- a/00-init-tools.sh +++ b/00-init-tools.sh @@ -203,6 +203,11 @@ _install_node() { _append_profile 'export PATH=$PATH:/usr/local/bin' + # 将 GitHub SSH 地址重写为 HTTPS(服务器通常没有 GitHub SSH 密钥) + git config --global url."https://github.com/".insteadOf "git+ssh://git@github.com/" 2>/dev/null || true + git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" 2>/dev/null || true + git config --global url."https://github.com/".insteadOf "git@github.com:" 2>/dev/null || true + success " Node.js $(node --version),npm $(npm --version) 安装完成" _has pnpm && success " pnpm $(pnpm --version)" _has yarn && success " yarn $(yarn --version)"