Skip to main content

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
Proxy Behavior:
  • Automatically uses system proxy
  • No configuration needed
  • Transparent to the user

Git/libcurl

For Git Operations:
  • git clone
  • git push
  • git pull
  • git fetch
Proxy Behavior:
  • 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

1

Determine Remote Endpoint

Identify the URL for the Git operation (e.g., https://github.com)
2

Check for Manual Config

Verify user hasn’t set http_proxy, https_proxy, or all_proxy environment variables
3

Ask Electron to Resolve

Use Electron’s proxy resolution to get the proxy for the URL
4

Parse PAC String

Parse the Proxy Auto-Configuration string returned
5

Set Environment Variables

Set http_proxy or https_proxy for Git to use
From the technical documentation:

PAC String Parsing

Proxy Auto-Configuration (PAC) responses can be:
GitHub Desktop parses these and extracts the first usable proxy.

Proxy Environment Variables

Standard Environment Variables

Git recognizes these environment variables:
Both lowercase and uppercase versions are checked. Lowercase takes precedence.

Proxy URL Formats

HTTPS proxies (https://proxy...) are not supported in the version of Git/libcurl shipped with GitHub Desktop on Windows.

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:
This tells Git:
  • “When connecting to https://github.com…”
  • “…use the HTTP proxy at http://proxy.local:8080
Note: The proxy itself uses HTTP (not HTTPS), but it’s for HTTPS destinations.

HTTPS Proxies

Rare scenario:
This means:
  • Connect to the proxy using HTTPS
  • Very uncommon
  • Not supported by Git on Windows

Windows: Certificate Revocation

The Problem

On Windows, Git uses the schannel SSL backend, which:
  • Checks certificate revocation lists (CRL)
  • Throws errors if CRL check fails
  • Common with MITM (SSL-intercepting) proxies
Error Message:

MITM Proxies

Some corporate proxies intercept HTTPS:
  1. Proxy issues its own “fake” certificate
  2. Certificate doesn’t include CRL distribution points
  3. Windows schannel can’t check revocation
  4. Connection fails

Solution

Disable certificate revocation checks:
Disabling revocation checks reduces security. Only do this in environments with MITM proxies where it’s required.

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 before
GitHub Desktop:
  1. Detects the schannel revocation error
  2. Shows a dialog explaining the issue
  3. Offers to disable revocation checks
  4. 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

A blank http.proxy config value (even if empty) will prevent GitHub Desktop’s automatic proxy from working. Remove it with git config --global --unset http.proxy.

Test Git with Proxy

Manual Proxy Configuration

Setting Environment Variables

Temporary (current session):
Permanent (system-wide):
  1. Open System Properties
  2. Advanced > Environment Variables
  3. Add http_proxy and https_proxy
  4. Restart GitHub Desktop

Git Configuration Method

Authenticating Proxies

Credentials in URL

Embedding credentials in environment variables or Git config can be a security risk. They may be visible in process lists or config files.

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

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
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
If proxy works differently for different repos:
  • Check repository-specific Git config
  • Look for .git/config with proxy settings
  • Verify remote URLs (SSH vs HTTPS)
  • SSH connections don’t use HTTP proxy
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

  1. Let GitHub Desktop Handle It
    • Use automatic proxy detection when possible
    • Only manually configure if automatic fails
    • Don’t set environment variables unless needed
  2. Use HTTPS, Not SSH
    • HTTPS works through most proxies
    • SSH often blocked by corporate firewalls
    • Clone with HTTPS URLs when behind proxy
  3. Document Your Setup
    • Keep notes on proxy configuration
    • Share with team members
    • Include in onboarding docs
  4. Secure Credentials
    • Avoid embedding passwords in config
    • Use credential managers when possible
    • Check with IT for best practices
  5. Test Regularly
    • Verify proxy still works after updates
    • Test different network locations
    • Confirm with IT on configuration changes