Using Git on Windows, behind an HTTP proxy, without storing proxy password on disk

前端 未结 4 968
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 00:05

I\'m using Git on Windows, on a corporate network where I\'m behind an HTTP proxy with Basic authentication. Outbound SSH doesn\'t work, so I have to use HTTPS through the p

4条回答
  •  温柔的废话
    2020-12-13 00:35

    VonC's answer doesn't always solve the problem. I don't know why, but it may depend on the proxy server - or maybe it's some other issue alltogether?

    It may help to replace the git:// protocol of the repository with http://.

    Note: As in VonC's answer, you'll have to setup the http(s)_proxy environment variables first:

    set http_proxy=http://username:password@proxydomain:port
    set https_proxy=http://username:password@proxydomain:port
    

    For example, clone marble's stable git would usually be cloned like this (from the marble documentation):

    git clone -b Applications/15.12 git://anongit.kde.org/marble ~/marble/sources

    In windows' cmd (assuming http_proxy has been set), you may then have to use http[s]:// instead:

    git clone -b Applications/15.12 http://anongit.kde.org/marble ~/marble/sources
    

提交回复
热议问题