Set proxy for Microsoft Git Provider in Visual Studio

Viewed 25967

I have to use http proxy to connect to Git server. I am able to set it through Git Bash and use it too through the following command:

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080

However, I am using Microsoft Git Provider integration with Visual Studio. And I am not able to set proxy anywhere to connect to Git server. Is there a way that I can save the proxy details for Microsoft Git Provider in Visual Studio?

4 Answers

If it helps someone, VS 2017 has a folder:

%ProgramFiles%\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\etc

with a file named gitconfig - the same as the file in C:\Users\[UserName]\.gitconfig - where you can set the proxy configuration for VS.

Another approach would be to go to your user folder c:\users\<account name> (in my case c:\users\danielj) and create a file called .gitconfig.

paste the following:

[user]
    name = <your name>
[user]
    email = <your email address>
[http]
    sslVerify = false
    proxy = "http://<username>%40<domain e.g. domain.com>:#<password>@<proxy server name>:<port>"
[https]
    sslVerify = false
Related