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

后端 未结 28 2784
星月不相逢
星月不相逢 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:16

    On Windows, if you don't want to put your password in .gitconfig in the plain text, you can use

    • Cntml (http://cntlm.sourceforge.net/)

    It authenticates you against normal or even Windows NTLM proxy and starts localhost-proxy without authentication.

    In order to get it run:

    • Install Cntml
    • Configure Cntml according to documentation to pass your proxy authentication
    • Point git to your new localhost proxy:

      [http]
          proxy = http://localhost:3128       # change port as necessary
      

提交回复
热议问题