Search code examples
githttp-proxy

cloning a corporate git repo


I normally use git behind a proxy. Hence I have those set in my global config. git config -l --global has entries for http & https.

However for accessing the corporate git repo, I have to unset the global proxy and then clone.

Is there an alternative where I don't have to change the global settings like this?


Solution

  • Have you tried setting environment variables for http_proxy, https_proxy, and no_proxy?

    Take a look at these two answers here on SO:

    Only use a proxy for certain git urls/domains?

    How to temporarily disable git http proxy