npm,yarn安装package时报错can't access https://github.com

lzzscl

 

好不容易,解决这个问题,使用git config proxy命令不顶用

 

必须在.gitconfig文件夹里设置proxy

 

我的.gitconfig设置

[difftool "sourcetree"]
	cmd = '' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
	cmd = "'' "
	trustExitCode = true
[user]
	name = xx@foxmail.com
	email = xx@foxmail.com
[http "https://github.com"]
	proxy = socks://127.0.0.1:10808

 

posted @ 2022-02-27 17:29  MoreJewels  阅读(136)  评论(0编辑  收藏  举报