Error Codes Wiki

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

  1. 1Set proxy environment variables: export HTTP_PROXY=http://user:pass@proxy:8080 and HTTPS_PROXY similarly
  2. 2Configure git: 'git config --global http.proxy http://user:pass@proxy:8080'
  3. 3Configure npm: 'npm config set proxy http://user:pass@proxy:8080' and 'npm config set https-proxy'
  4. 4For NTLM proxies, use CNTLM or Px as a local proxy that handles NTLM authentication transparently
  5. 5Check proxy settings in system preferences and ensure CLI tools pick them up

Tags

proxy407authenticationcorporatentlm

More in 4xx Client Error

Frequently 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.