> 技术文档 > 设置github 代理_github代理

设置github 代理_github代理

场景:执行CI需要下载GitHub仓库源码。访问很慢,有时会被中断。因此需要配置github代理。

代理网站更新频繁,可以在搜索引擎搜索关键词`github代理网站`,寻找最新可靠的代理网站。

假设代理网站是:

https://my-gh-proxy.top

 

单次下载配置:

`git clone https://my-gh-proxy.top/https://github.com/https://github.com/bytedance/UI-TARS-desktop`

全局配置:

`git config --global url.\"https://my-gh-proxy.top/https://github.com/\".insteadOf https://github.com/`

真正配置在` ~/.gitconfig`文件里。

```bash

cat ~/.gitconfig

```

```bash

[user]

        name = your-name

        email = your-email

[core]

        editor = vim

[url \"https://my-gh-proxy.top/https://github.com/\"]

        insteadOf = https://github.com/

```

移除全局配置:

`git config --global 00unset url.\"https://my-gh-proxy.top/https://github.com/\".insteadOf`