Crypto
01 Jan 2026
Read 12 min
How to fix HTTP 407 proxy authentication in 5 minutes *
Fix HTTP 407 proxy authentication and restore downloads in 5 minutes with a simple step-by-step fix.
Quick steps to fix HTTP 407 proxy authentication
- Confirm proxy details. Ask your IT team or check your VPN/proxy portal for the correct proxy host, port, and protocol (HTTP or HTTPS).
- Verify your username and password. If your company uses domain accounts, use domainusername or username@domain.
- Set system proxy settings. Configure Windows, macOS, or Linux so all apps see the proxy.
- Clear old credentials. Remove saved passwords that might be wrong.
- Test with curl. Make a quick request through the proxy with a known good site.
- Restart your app or browser. Many tools read proxy settings only at launch.
- Bypass internal hosts. Set NO_PROXY for localhost and your intranet.
Understand what triggers a 407
Typical reasons you see it
- Wrong username or password, or expired password.
- Incorrect proxy host, port, or protocol.
- PAC script (auto proxy) points to a dead or wrong proxy.
- Your app does not use the system proxy, so it never sends credentials.
- Proxy needs NTLM or Kerberos and you sent Basic auth.
- Special characters in your password were not URL encoded.
Set your system proxy the right way
Windows 10/11
- Go to Settings > Network & Internet > Proxy.
- If your company uses a script, turn on “Use setup script” and enter the script URL (PAC).
- If you need manual settings, turn on “Use a proxy server,” then enter address and port.
- Open Internet Options > Connections > LAN settings to confirm the same values.
- Open Credential Manager and delete wrong saved credentials for the proxy.
- WinHTTP (for services) can be set with:
netsh winhttp show proxy
netsh winhttp reset proxy
netsh winhttp set proxy proxy-server=”http=host:port;https=host:port” - For command-line tools, set environment variables:
setx http_proxy http://user:pass@host:port
setx https_proxy http://user:pass@host:port
macOS
- Open System Settings > Network. Select your active network (Wi‑Fi or Ethernet).
- Click Details > Proxies. Check “Web Proxy (HTTP)” and “Secure Web Proxy (HTTPS).” Enter host, port, and credentials.
- If you use a PAC file, check “Automatic Proxy Configuration” and enter the script URL.
- Remove stale passwords from Keychain Access for the proxy host.
- For terminal apps:
export http_proxy=”http://user:pass@host:port”
export https_proxy=”http://user:pass@host:port”
export NO_PROXY=”localhost,127.0.0.1,.intranet.local”
Linux
- Desktop: Settings > Network > Network Proxy. Set Manual or Automatic (PAC).
- Shell:
export http_proxy=”http://user:pass@host:port”
export https_proxy=”http://user:pass@host:port”
export NO_PROXY=”localhost,127.0.0.1,::1,.corp.local,10.0.0.0/8″ - APT example (Debian/Ubuntu) in /etc/apt/apt.conf.d/99proxy:
Acquire::http::Proxy “http://user:pass@host:port/”;
Acquire::https::Proxy “http://user:pass@host:port/”; - Encode special characters in credentials. Example: @ becomes %40, : becomes %3A.
- Use these steps to fix HTTP 407 proxy authentication on Linux when command-line tools fail.
Configure popular tools and browsers
Browsers
- Chrome and Edge use system proxy by default. Set it at the OS level and restart the browser.
- Firefox: go to Settings > General > Network Settings. Choose “Use system proxy settings” or set “Manual proxy configuration.” Clear any saved logins and try again.
Git
- Set proxy:
git config –global http.proxy “http://user:pass@host:port”
git config –global https.proxy “http://user:pass@host:port” - If your proxy uses Basic:
git config –global http.proxyAuthMethod basic - Remove proxy:
git config –global –unset http.proxy
git config –global –unset https.proxy
Node.js, npm, and yarn
- Environment variables often work best:
export HTTP_PROXY=”http://user:pass@host:port”
export HTTPS_PROXY=”http://user:pass@host:port” - npm config:
npm config set proxy “http://user:pass@host:port”
npm config set https-proxy “http://user:pass@host:port” - yarn config:
yarn config set proxy “http://user:pass@host:port”
yarn config set https-proxy “http://user:pass@host:port”
Python and pip
- Environment variables:
export PIP_PROXY=”http://user:pass@host:port”
(or rely on http_proxy/https_proxy) - pip config:
Linux/macOS: ~/.config/pip/pip.conf
Windows: %APPDATA%pippip.ini
Content:
[global]
proxy = http://user:pass@host:port - requests library example:
proxies = {“http”: “http://user:pass@host:port”, “https”: “http://user:pass@host:port”}
requests.get(“https://example.com”, proxies=proxies)
Docker
- For Docker Engine (systemd):
Create /etc/systemd/system/docker.service.d/http-proxy.conf with:
[Service]
Environment=”HTTP_PROXY=http://host:port” “HTTPS_PROXY=http://host:port” “NO_PROXY=localhost,127.0.0.1,.corp.local”
Then run: systemctl daemon-reload && systemctl restart docker - For builds, set BuildKit proxy or pass build-args:
docker build –build-arg http_proxy=… –build-arg https_proxy=… .
Handle special corporate setups
- NTLM or Kerberos SSO: Use domainusername in your credentials. For curl, try:
curl -v –proxy http://host:port –proxy-ntlm –proxy-user “domainuser:pass” https://example.com - PAC files: If you use a PAC script, make sure the URL is reachable and correct. Load it in a browser to verify it returns JavaScript.
- Split tunneling and bypasses: Add intranet domains and IP ranges to NO_PROXY so local traffic does not hit the proxy.
- Account lockouts: Too many bad attempts can lock your account. Reset your password or wait per company rules.
- Protocol mismatch: If the proxy requires HTTPS, do not set an HTTP proxy URL. Match the protocol your IT team provides.
Test and confirm the fix
Quick curl checks
- Basic test:
curl -I -x http://host:port https://example.com
If you get 407, add credentials:
curl -I -x http://host:port -U user:pass https://example.com - Verbose output:
curl -v –proxy http://host:port –proxy-user user:pass https://api.github.com
Look for Proxy-Authenticate and Proxy-Authorization headers. A 200/301/302 means it worked.
Validate in your app
- Restart the app after changing proxy settings.
- Check if the app has its own proxy setting that overrides the system.
- Try a direct connection (disable proxy) to confirm the issue is only the proxy.
Security tips when using proxies
- Do not share your proxy password in screenshots or logs.
- Use a machine-level secret store or credential manager when possible.
- Prefer environment variables over hardcoding credentials in scripts.
- URL-encode special characters in usernames and passwords to avoid parsing errors.
When to call IT
- You have the right settings, but 407 persists across devices.
- Your account is locked or your password does not work anywhere else.
- The proxy PAC file URL fails to load, or the proxy host does not resolve.
- You need NTLM/Kerberos single sign-on and your tools do not support it natively.
For more news: Click Here
FAQ
* The information provided on this website is based solely on my personal experience, research and technical knowledge. This content should not be construed as investment advice or a recommendation. Any investment decision must be made on the basis of your own independent judgement.
Contents