Skip to content
Fix Code Error

Getting Git to work with a proxy server – fails with “Request timed out”

March 13, 2021 by Code Error
Posted By: Anonymous

How do I get Git to use a proxy server?

I need to check out code from a Git server, but it shows “Request timed out” every time. How do I get around this?

Alternatively, how can I set a proxy server?

Solution

Command to use:

git config --global http.proxy http://proxyuser:[email protected]:8080
  • change proxyuser to your proxy user
  • change proxypwd to your proxy password
  • change proxy.server.com to the URL of your proxy server
  • change 8080 to the proxy port configured on your proxy server

Note that this works for both http and https repos.

If you decide at any time to reset this proxy and work without proxy:

Command to use:

git config --global --unset http.proxy

Finally, to check the currently set proxy:

git config --global --get http.proxy
Answered By: Anonymous

Related Articles

  • Python - Read JSON - TypeError: string indices must be…
  • An Authentication object was not found in the…
  • How do SO_REUSEADDR and SO_REUSEPORT differ?
  • The definitive guide to form-based website authentication
  • webpack-dev-server npm run dev throwing TypeError: Cannot…
  • Rust: implementing an iterator from a vector of std::Rc…
  • Why do I have to "git push --set-upstream origin "?
  • Worker Script Failing to Load for Vue Webpack Built App
  • Git - Pushing code to two remotes
  • Is there a way to cache GitHub credentials for pushing…

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

How can I get the application’s path in a .NET console application?

Next Post:

gcc makefile error: “No rule to make target …”

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Get code errors & solutions at akashmittal.com
© 2022 Fix Code Error