You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve ease of configuring Git to work with corporate proxy #2789
OS version: Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.
Steps to Reproduce
Have a .pac based proxy.
Have no way to get to the internet other than the proxy.
Try and clone
Eventually it times out.
Expected behavior: Expected to clone repo to local machine
Actual behavior: Nothing
Reproduces how often: 100%
Reacted by Raphael Dumas, Enzo, Sravanth Baratam, Insaf Ashrapov, Jason Whittle, Peter Miľovčík, Priyatham, Jonathan Allen Grant, joshmcode, Vladimir Lemos and 11 more
Where proxyuser and proxypwd are your credentials, and proxy.server.com:8080 is the server name and port you connect to.
Reacted by Phillip Gibb, Muhammad Faizan Khan, Giselle Tavares, Richard Warburton, Emem Umoh, abhidwip, Vinay Neekhra, anitadc, Monika Tamsoy, kmsingh1993 and 84 more
Reacted by Raphael Dumas, Ed, Jess Neuner, youn, Priyansh Singh, JeltzProstetnic, 子房, Thomas Guenther, NicholeL, daqieq and 6 more
Reacted by ThamiMadoda, Pontus Hultkrantz, Soumik Kumar Baithalu and Lakshman Gundapu
Reacted by Cristian Angel Puma Villalva, Vítor Severo and ThamiMadoda
Reacted by NomakhosiValentine
Reacted by Daniel Keogh, Giselle Tavares, Vinay Neekhra, anitadc, Daniel Dafoe (He/Him), Dinesh AR, Ali Tayari, Ayan Das, Leandro José Capdesuñer Garcia, Maxim Aleshin and 18 more
Reacted by Vítor Severo, dmib, Cesar Manuel Ríos , ThamiMadoda and Pontus Hultkrantz
Reacted by Cristian Angel Puma Villalva, Vítor Severo, Edoardo Musumeci, Pontus Hultkrantz, MarkGrall and Rajesh Yandrathi
This idea is interesting for the future, but this is beyond the scope of our current roadmap.
I added the future-proposal label to this issue and closed it so that we won't get overwhelmed with our backlog! We will revisit this in our next planning session.
I just want to point out how confusing this issue is for someone who downloads this application, has no configuration required, can login to Github successfully in the app and then.... can't use it.
Surely the number of people who use Windows in a corporate environment and are behind a proxy is high (everyone I know in government).
Reacted by Eric O. LEBIGOT (EOL), charlewit-mathavorn, Rachel Nastelin, HulliRo, limiyan, Simon John Roberts, Jess Neuner, Amayii, pharmbot, JeltzProstetnic and 21 more
Is there a non-command line option to fix this when using GitHub Desktop? I'm in the same situation. On my work laptop, and don't have a command-line option to enter something like:
Reacted by Peter Gregorio, Shivank Shekhar, prasadvagdargi, Suraj Ganpat Yadav, ckarpowicz, Yevheniia Rakhmatova, James Daly, Sujay, Horia Ivan, Jason Whittle and 10 more
For those you who are interested in helping us verify the new functionality supporting proxies, we kindly ask for any feedback as it is much appreciated, Thank you!
I know you've already done the manual setup involved in getting this working, so apologies for the ask.
Would you be willing to help us verify that what we're planning to release does actually work as intended by unsetting the proxy config and downloading the current beta version? We've done some manual testing, but verifying that it works from someone who actually experienced the problem first hand would be really helpful in giving us confidence that we're helping others who had the same problem y'all did.
Here are the steps:
Run git config --global --unset http.proxy in the terminal
Run the beta version and clone any repo from GitHub
Ensure that fetching, pushing, or pulling works as expected
If it worked properly, using the beta version should just set the proper Git config proxy settings up for you and hopefully is transparent. Please let us know if you're able to test this, and we're happy to answer any questions about the steps if you have them. Thank you!
@radumas Apologies! I updated my comment. I believe the command should instead be git config --global --unset http.proxy and I updated the beta link to be the correct one. Sorry about that!
Doesn't work for me. I installed 2.4.3 over a previous version (from Nov 2019).
I'm connected to my internal network via VPN and then authenticated Proxy out to GitHub.
I'm on Windows 10
Git itself is working fine for remote operations with config credential.helper=wincred (I don't have any http.proxy settings in git itself, or in my shell (Powershell)). Proxy is set in Windows System Settings with a pac script.
So if I try to pull from a remote on Github with Github Desktop I get
"fatal: unable to access 'https://github.com....': Received HTTP code 407 from proxy after CONNECT"
but if I choose from Github Desktop "Repository > Open in Powershell" and then do git pull, it works fine, with no need to type username / password, since they are stored in Windows Credential Manager and git is configured to use wincred for credential.helper
I want Github Desktop to work though because there are other users in our org who would benefit from using the GUI for remote operations.
(Yes the last line is correct, we are using HTTP CONNECT to tunnel HTTPS across the HTTP connection)
The connection to the proxy is made but a 407 is returned because no credentials are sent. (There is no Proxy-Authorization: header at all in the request to the proxy.)
I don't believe this issue is fixed as it's not working for me either.
I've just installed v2.9.6 and although I've been able to sign in to GitHub Desktop I can't even clone any repos. I continue to get the "Received HTTP code 407 from proxy after CONNECT" error.
Updating gitconfig with proxy details, either with or without credentials, makes absolutely no difference, the same error is returned.
@TomF475 the 407 error usually indicated that your credentials are not being accepted. Can you verify you configured the proxy settings correctly in your .gitconfig?
Agree, with @NotAProfessionalDeveloper @TomF475 I posted after the issue was closed because it was not resolved for me.
I just ended up not using GitHub Desktop.
Agree, with @NotAProfessionalDeveloper @TomF475 I posted after the issue was closed because it was not resolved for me. I just ended up not using GitHub Desktop.
FYI, if you still face some problem on the proxy with git (like me), this issue may be caused by git's default anyauth proxy setting. It fails if the proxy doesn't respond to the initial request with a standard 407 challenge. While this challenge-response behavior from git is compliant with RFC 7235, some proxies may not follow this specific flow.
The fix is to force git to use Basic auth proactively with this command:
Activity
shiftkey commentedon Sep 20, 2017
@DanielKeogh currently you still need to tell Git about your proxy settings:
Where
proxyuserandproxypwdare your credentials, andproxy.server.com:8080is the server name and port you connect to.DanielKeogh commentedon Sep 20, 2017
If you just tell Git for me, I would really appreciate it. 👍
(Thanks, this is a feature request now.)
iAmWillShepherd commentedon Sep 20, 2017
Thanks for the suggestion!
This idea is interesting for the future, but this is beyond the scope of our current roadmap.
I added the future-proposal label to this issue and closed it so that we won't get overwhelmed with our backlog! We will revisit this in our next planning session.
radumas commentedon Oct 13, 2017
I just want to point out how confusing this issue is for someone who downloads this application, has no configuration required, can login to Github successfully in the app and then.... can't use it.
Surely the number of people who use Windows in a corporate environment and are behind a proxy is high (everyone I know in government).
MuhammadFaizanKhan commentedon Nov 9, 2017
Any progress? I am getting this error as my system behind proxy.
ehale209 commentedon Nov 14, 2017
Is there a non-command line option to fix this when using GitHub Desktop? I'm in the same situation. On my work laptop, and don't have a command-line option to enter something like:
joshaber commentedon Nov 14, 2017
Unfortunately configuring the proxy from the command line is the only solution I'm aware of.
mapx- commentedon Nov 24, 2017
So, a windows user can access no command line, right ? or could I edit (or add) some config file in my github desktop ?
joshaber commentedon Nov 27, 2017
Se https://git-for-windows.github.io to install Git on the command line for Windows.
rcrodrix commentedon Dec 20, 2017
Thanks, joshaber! Installed it, and ran the command from shiftkey. All is well now. Much appreciated.
harshzalavadiya commentedon Mar 9, 2018
i have faced same problem after trying out one complete day got an easy solution(workaround)
double proxied it with nginx so my behind proxy git repository server is mapped to my local and gocd can do cloning easily
radumas commentedon Jun 15, 2018
So.... now that Microsoft owns GitHub....
zuigz commentedon Aug 3, 2018
Thanks. At least I can work with 👍
git config --global http.proxy http://proxyuser:[email protected]:8080
30 remaining items
tierninho commentedon Mar 17, 2020
For those you who are interested in helping us verify the new functionality supporting proxies, we kindly ask for any feedback as it is much appreciated, Thank you!
You will need to run a command to disable the workaround:
git config unset --global http.proxythen download Beta: https://github.com/desktop/desktop#beta-channel, sign in, and you are good to go!cc @datalifenyc @radumas @rizwanjaved @renu555 @schlamar @MuhammadFaizanKhan @amayii0 @DanielKeogh @NanoJoey @priyanshnama @AtomicCons
billygriffin commentedon Mar 17, 2020
Hi all! @datalifenyc @radumas @rizwanjaved @renu555 @schlamar @MuhammadFaizanKhan @amayii0 @DanielKeogh @NanoJoey @priyanshnama @AtomicCons
I know you've already done the manual setup involved in getting this working, so apologies for the ask.
Would you be willing to help us verify that what we're planning to release does actually work as intended by unsetting the proxy config and downloading the current beta version? We've done some manual testing, but verifying that it works from someone who actually experienced the problem first hand would be really helpful in giving us confidence that we're helping others who had the same problem y'all did.
Here are the steps:
git config --global --unset http.proxyin the terminalIf it worked properly, using the beta version should just set the proper Git config proxy settings up for you and hopefully is transparent. Please let us know if you're able to test this, and we're happy to answer any questions about the steps if you have them. Thank you!
DanielKeogh commentedon Mar 18, 2020
I would, but I'm not behind this kind of proxy any more.
radumas commentedon Mar 23, 2020
#2789 (comment)
So I'm actually now running into the reverse issue, not necessarily using our proxy while WFH. I got an error message on this line that
Also your link in Point 2 is wrong. I will test the new Beta when I am connected to our proxy though!
billygriffin commentedon Mar 24, 2020
@radumas Apologies! I updated my comment. I believe the command should instead be
git config --global --unset http.proxyand I updated the beta link to be the correct one. Sorry about that!mohammadyacn314 commentedon Mar 29, 2020
just disable antivirus & firewall or
convert https to http
billygriffin commentedon Mar 30, 2020
This shipped in 2.4, so hopefully the vast majority of people using Desktop from behind a proxy it'll just work! Thanks for the input y'all. ❤️
jshealth commentedon May 4, 2020
Doesn't work for me. I installed 2.4.3 over a previous version (from Nov 2019).
I'm connected to my internal network via VPN and then authenticated Proxy out to GitHub.
I'm on Windows 10
Git itself is working fine for remote operations with config
credential.helper=wincred(I don't have any http.proxy settings in git itself, or in my shell (Powershell)). Proxy is set in Windows System Settings with a pac script.So if I try to pull from a remote on Github with Github Desktop I get
"fatal: unable to access 'https://github.com....': Received HTTP code 407 from proxy after CONNECT"
but if I choose from Github Desktop "Repository > Open in Powershell" and then do
git pull, it works fine, with no need to type username / password, since they are stored in Windows Credential Manager and git is configured to use wincred for credential.helperI want Github Desktop to work though because there are other users in our org who would benefit from using the GUI for remote operations.
TheNetworkIsDown commentedon Jul 2, 2020
Neither using .gitconfig nor the corresponding Git command make it use the proxy.
(Yes the last line is correct, we are using HTTP CONNECT to tunnel HTTPS across the HTTP connection)
The connection to the proxy is made but a 407 is returned because no credentials are sent. (There is no Proxy-Authorization: header at all in the request to the proxy.)
TomF475 commentedon Feb 2, 2022
I don't believe this issue is fixed as it's not working for me either.
I've just installed v2.9.6 and although I've been able to sign in to GitHub Desktop I can't even clone any repos. I continue to get the "Received HTTP code 407 from proxy after CONNECT" error.
Updating gitconfig with proxy details, either with or without credentials, makes absolutely no difference, the same error is returned.
steveward commentedon Feb 8, 2022
@TomF475 the 407 error usually indicated that your credentials are not being accepted. Can you verify you configured the proxy settings correctly in your .gitconfig?
TheNetworkIsDown commentedon Feb 9, 2022
Why are we even discussing this here. The issue is closed. Why is it closed?!
jshealth commentedon Feb 9, 2022
Agree, with @NotAProfessionalDeveloper @TomF475 I posted after the issue was closed because it was not resolved for me.
I just ended up not using GitHub Desktop.
amayii0 commentedon Feb 9, 2022
Same as @jshealth, Visual Studio Code is enough for me.

Atlassian Sourcetree when going fancy.
zeocax commentedon Jul 5, 2025
FYI, if you still face some problem on the proxy with git (like me), this issue may be caused by git's default anyauth proxy setting. It fails if the proxy doesn't respond to the initial request with a standard 407 challenge. While this challenge-response behavior from git is compliant with RFC 7235, some proxies may not follow this specific flow.
The fix is to force git to use Basic auth proactively with this command:
git config --global http.proxyAuthMethod 'basic'