Git Setup HTTPS/SSH Proxy Speed up Git operations on sites like GitHub (Windows/Linux/Mac)
Practical Tutorials
Lazy loaded imageGit Setup HTTPS/SSH Proxy Speed up Git operations on sites like GitHub (Windows/Linux/Mac)
Words 282Read Time 1 min
2024-12-18
2025-6-27
AI intelligent summary
GPT
The article explains how to configure Git proxies for HTTPS/SSH to accelerate operations (e.g., on GitHub). It covers setting HTTP/HTTPS proxies via `git config --global http.proxy` and SSH proxies (Windows/Linux/Mac), including steps to view, modify, or cancel proxy settings. Examples compare HTTPS (`git clone https://...`) and SSH (`git clone git@...`) protocols.
This article discusses how to set up HTTPS and SSH proxies for Git to speed up operations on sites like GitHub. Proxy configuration methods for HTTP/HTTPS and SSH protocols are provided, including how to set, view, and cancel proxy settings, as well as specific steps for configuring SSH proxies on different operating systems.
 

📝 Main content

1. Git can configure the protocol type of the proxy

  • HTTPS protocol. git clone https://github.com/python-telegram-bot/python-telegram-bot.git
  • SSH Protocol. git clone git@github.com:python-telegram-bot/python-telegram-bot.git
⚠️
GitHub's default clone is the Https-based
notion image

2. HTTP/HTTPS protocol configuration proxy

  • Go to HTTP proxy
    • git config --global http.proxy "http://127.0.0.1:7890"
      git config --global https.proxy "http://127.0.0.1:7890"
  • Go socks5 proxy
    • git config --global http.proxy "socks5://127.0.0.1:7890"
      git config --global https.proxy "socks5://127.0.0.1:7890"
  • Viewing Git Settings git config --list
    • git config --global --list
  • Cancel Proxy Settings
    • git config --global --unset http.proxy
      git config --global --unset https.proxy

3. SSH protocol configuration agent

⚠️
# Linux, Mac vi ~/.ssh/config # Windows C:\Users\<username>\.ssh directory, create a new config file (no suffix)
Add the following line to the configuration file
#Linux、Mac ProxyCommand nc -v -x 127.0.0.1:7890 %h %p #Windows 安装Git会自带connect.exe,请注意你的路径 ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 127.0.0.1:7890 %h %p

🤗 Summarize and summarize

⚠️
Note that there are two ways to proxy, so the Both need to be set up! (This is where I stepped in the hole, hence this post)

📎 Reference article

primary reference
 
💡
acceptable become a member Telegram's Little Warehouse of Seven Rows | Internet Memories | Blogs  cap Seven lines Technical Exchange Group  Find more tips oh 🥰 and also discuss various issues in the chat group ❓
Welcome to the Bottom comment section. Share your thoughts and experiences with Let's discuss and improve together!

Comments
Loading...