Git 配置网络代理

Git 配置文件

一般情况下,全局配置文件路径是 C:\Users\你的用户名\.gitconfig

项目单独的配置文件路径是 你的项目路径\.git\config,需要显示隐藏文件才能看到 .git 文件夹。

配置代理

需要知道自己本地代理的端口。假设本地 socks 代理端口为 10808http 代理端口为 10809,则有以下两种方式:

1. socks5
[http "https://github.com"]
	proxy = socks5://127.0.0.1:10808
[https "https://github.com"]
	proxy = socks5://127.0.0.1:10808
2. http
[http "https://github.com"]
	proxy = http://127.0.0.1:10809
[https "https://github.com"]
	proxy = https://127.0.0.1:10809

以下是用户名配置:

[user]
	name = abcd
	email = [email protected]

你可能感兴趣的:(工具,git)