Git through a Proxy. What is causing the 407 error when cloning?

后端 未结 11 2168
长发绾君心
长发绾君心 2020-12-08 16:20

I\'m trying to use Git through a proxy. I\'ve tried setting parameters \'git config --global\' in a lot of ways but always without success when cloning repositories.

11条回答
  •  半阙折子戏
    2020-12-08 17:19

    If you are inside a corporate firewall and you are using windows git bash then:

    Open global gitconfig file, usually this will be under C:\Users\USER_NAME.gitconfig and add the below lines if not exists.

    [http]
    proxy = http://USER_NAME:PASSWORD@PROXY_URL:PROXY_PORT
    sslverify = false
    [https]
    proxy = http://USER_NAME:PASSWORD@PROXY_URL:PROXY_PORT
    sslverify = false
    

    Make sure your password does not have '@' character. If you still have the problem and you are using proxy url instead IP then: Open command - 'Windows Key+R' and type cmd then hit enter execute the command:

    nslookup PROXY_URL

    This will give some ip addresses. Try these ip addresses in .giconfig instead of PROXY_URL.

提交回复
热议问题