How do I pull from a Git repository through an HTTP proxy?

后端 未结 28 2232
星月不相逢
星月不相逢 2020-11-22 11:57

Note: while the use-case described is about using submodules within a project, the same applies to a normal git clone of a repository over HTTP.

I have

28条回答
  •  名媛妹妹
    2020-11-22 12:25

    Set Git credential.helper to wincred.

    git config --global credential.helper wincred
    

    Make sure there is only 1 credential.helper

    git config -l
    

    If there is more than 1 and it's not set to wincred remove it.

    git config --system --unset credential.helper
    

    Now set the proxy with no password.

    git config --global http.proxy http://@proxy:80
    

    Check that all the settings that you added looks good....

    git config --global -l
    

    Now you good to go!

提交回复
热议问题