HTTP 407 Proxy Authentication — Corporate Proxy Authorization Failures
Warning4xx client error
Overview
Fix HTTP 407 Proxy Authentication Required errors in corporate environments where proxy servers require credentials for internet access.
Key Details
- HTTP 407 indicates the client must authenticate with the proxy server before the request is forwarded
- Corporate proxy servers commonly require domain credentials (NTLM, Kerberos, or Basic authentication)
- The proxy responds with Proxy-Authenticate header indicating the supported authentication schemes
- CLI tools, Docker, npm, pip, and git often fail behind corporate proxies without explicit configuration
- Proxy auto-configuration (PAC) files may route different URLs through different proxy servers
Common Causes
- HTTP_PROXY/HTTPS_PROXY environment variables not set for command-line tools
- Proxy credentials expired or changed since last configuration
- Tool not supporting the proxy authentication scheme (e.g., NTLM not supported by basic HTTP clients)
- PAC file routing requests to a different proxy than configured
Steps
- 1Set proxy environment variables: export HTTP_PROXY=http://user:pass@proxy:8080 and HTTPS_PROXY similarly
- 2Configure git: 'git config --global http.proxy http://user:pass@proxy:8080'
- 3Configure npm: 'npm config set proxy http://user:pass@proxy:8080' and 'npm config set https-proxy'
- 4For NTLM proxies, use CNTLM or Px as a local proxy that handles NTLM authentication transparently
- 5Check proxy settings in system preferences and ensure CLI tools pick them up
Tags
proxy407authenticationcorporatentlm
More in 4xx Client Error
http-400-bad-requestHTTP 400 Bad Request — What It Means & How to Fix It
Errorhttp-401-unauthorizedHTTP 401 Unauthorized — What It Means & How to Fix It
Errorhttp-402-payment-requiredHTTP 402 Payment Required — What It Means & How to Fix It
Errorhttp-403-forbiddenHTTP 403 Forbidden — What It Means & How to Fix It
Errorhttp-404-not-foundHTTP 404 Not Found — What It Means & How to Fix It
Errorhttp-405-method-not-allowedHTTP 405 Method Not Allowed — What It Means & How to Fix It
ErrorFrequently Asked Questions
Check System Preferences > Network > Advanced > Proxies on Mac, or Settings > Network > Proxy on Windows. Corporate IT may also provide a PAC file URL.