Overview
GitHub Desktop automatically detects and uses your system proxy settings for Git network operations. This ensures Git commands work seamlessly in corporate environments and restricted networks.Automatic Detection
Automatically uses system proxy configuration
PAC Support
Resolves Proxy Auto-Configuration (PAC) scripts
Git Integration
Sets appropriate environment variables for Git
MITM Compatibility
Handles SSL-intercepting proxies on Windows
How Proxy Support Works
GitHub Desktop uses a two-part approach for network operations:Chromium Network Stack
For GitHub API Requests:- Sign-in authentication
- Fetching repository lists
- Pull request information
- Issue data
- Automatically uses system proxy
- No configuration needed
- Transparent to the user
Git/libcurl
For Git Operations:git clonegit pushgit pullgit fetch
- Requires manual configuration
- GitHub Desktop auto-configures via environment variables
- Uses system proxy resolution
Git itself doesn’t automatically detect system proxies, which is why GitHub Desktop bridges this gap by setting the appropriate environment variables.
Automatic Proxy Configuration
GitHub Desktop automatically configures Git proxy settings when performing network operations:Proxy Resolution Flow
Check for Manual Config
Verify user hasn’t set
http_proxy, https_proxy, or all_proxy environment variablesPAC String Parsing
Proxy Auto-Configuration (PAC) responses can be:Proxy Environment Variables
Standard Environment Variables
Git recognizes these environment variables:Both lowercase and uppercase versions are checked. Lowercase takes precedence.
Proxy URL Formats
Git Configuration
Alternatively, configure proxy in Git config:Git config
http.proxy takes precedence over environment variables. GitHub Desktop uses environment variables to avoid overriding user’s Git config.HTTPS vs. http_proxy
Understanding the difference:The https_proxy Variable
Specifies: Which proxy to use when connecting to HTTPS URLs
Example:
- “When connecting to
https://github.com…” - “…use the HTTP proxy at
http://proxy.local:8080”
HTTPS Proxies
Rare scenario:- Connect to the proxy using HTTPS
- Very uncommon
- Not supported by Git on Windows
Windows: Certificate Revocation
The Problem
On Windows, Git uses theschannel SSL backend, which:
- Checks certificate revocation lists (CRL)
- Throws errors if CRL check fails
- Common with MITM (SSL-intercepting) proxies
MITM Proxies
Some corporate proxies intercept HTTPS:- Proxy issues its own “fake” certificate
- Certificate doesn’t include CRL distribution points
- Windows schannel can’t check revocation
- Connection fails
Solution
Disable certificate revocation checks:GitHub Desktop’s Approach
From the technical docs:#9188 detects this specific error and allows the user to disable revocation checks. Note: the toggle to turn this setting on or off in the options dialog is hidden unless this condition has been encountered beforeGitHub Desktop:
- Detects the schannel revocation error
- Shows a dialog explaining the issue
- Offers to disable revocation checks
- Only shows the setting after encountering the error
Debugging Proxy Issues
Check Electron’s Proxy Resolution
In GitHub Desktop’s developer console (Ctrl+Shift+I or Cmd+Option+I):
Check Environment Variables
In the developer console:Check Git Configuration
Test Git with Proxy
Manual Proxy Configuration
Setting Environment Variables
- Windows
- macOS/Linux
Temporary (current session):Permanent (system-wide):
- Open System Properties
- Advanced > Environment Variables
- Add
http_proxyandhttps_proxy - Restart GitHub Desktop
Git Configuration Method
Authenticating Proxies
Credentials in URL
Future Support
From the technical docs:A stretch goal for the proxy support was supporting authenticating proxies. That unfortunately didn’t make it in. Worth noting here is that not even Electron supports authenticating proxies out of the box…Currently, GitHub Desktop does not have built-in support for proxies requiring authentication beyond embedding credentials in the URL.
Troubleshooting
Git Operations Fail, API Works
Git Operations Fail, API Works
If you can sign in but can’t clone/push/pull:
- API uses Chromium (auto proxy)
- Git uses libcurl (needs configuration)
- Check if environment variables are set
- Verify Git config doesn’t have blank
http.proxy - Try manual proxy configuration
Certificate Errors (Windows)
Certificate Errors (Windows)
If you see SSL/TLS handshake errors:
- Likely a MITM proxy
- Try:
git config --global http.schannelCheckRevoke false - Check with IT about the proxy’s certificate
- Ensure proxy’s CA certificate is trusted
Proxy Works for Some, Not Others
Proxy Works for Some, Not Others
If proxy works differently for different repos:
- Check repository-specific Git config
- Look for
.git/configwith proxy settings - Verify remote URLs (SSH vs HTTPS)
- SSH connections don’t use HTTP proxy
Performance is Slow
Performance is Slow
If operations are slower than expected:
- Proxy resolution might be slow
- PAC file might be complex
- Try setting explicit environment variables
- Contact IT about proxy performance
Best Practices
-
Let GitHub Desktop Handle It
- Use automatic proxy detection when possible
- Only manually configure if automatic fails
- Don’t set environment variables unless needed
-
Use HTTPS, Not SSH
- HTTPS works through most proxies
- SSH often blocked by corporate firewalls
- Clone with HTTPS URLs when behind proxy
-
Document Your Setup
- Keep notes on proxy configuration
- Share with team members
- Include in onboarding docs
-
Secure Credentials
- Avoid embedding passwords in config
- Use credential managers when possible
- Check with IT for best practices
-
Test Regularly
- Verify proxy still works after updates
- Test different network locations
- Confirm with IT on configuration changes