当前位置:   article > 正文

git bash 设置代理和github慢问题解决_git bash 代理

git bash 代理

git bash 设置代理和github慢问题解决

git代理配置

设置

右键打开git bash

$ git config --global https.proxy "socks5h://119.12.161.125:51801"

$ git config --global http.proxy "socks5h://119.12.161.125:51801"
  • 1
  • 2
  • 3

注意:

socks5后面不加那个h, 可能会提示: Can’t complete SOCKS5 connection xx.xx.xx.xx

git 中sock5 代理不支持不能设置用户名和密码

查看

$ git config --global --get http.proxy
$ git config --global --get https.proxy
  • 1
  • 2

取消

$ git config --global --unset http.proxy
$ git config --global --unset https.proxy
  • 1
  • 2

github访问慢

windows

C:\Windows\System32\drivers\etc\hosts 

#20.205.243.166    github.com
140.82.114.4    github.com
199.232.5.194   github.global.ssl.fastly.net
  • 1
  • 2
  • 3
  • 4
  • 5

linux

vim /etc/hosts

#20.205.243.166    github.com
140.82.114.4    github.com
199.232.5.194   github.global.ssl.fastly.net
  • 1
  • 2
  • 3
  • 4
  • 5

问题

提示No supported authentication methods available错误

TortoiseGitSSH client修改为GitBash对应的SSH程序

在这里插入图片描述

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号