Lesstep
GitHub · company proxy · HTTP 407 · Checked November 22, 2026

GitHub: 407 "Proxy Authentication Required"

The 407 does not come from GitHub. A proxy between you and GitHub wants you to log in to it before it passes the request on. RFC 9110, section 15.5.8 defines it as similar to 401, but meaning that the client needs to authenticate itself in order to use a proxy for this request; the proxy must send a Proxy-Authenticate header with the challenge, and the client may repeat the request with a Proxy-Authorization header. So the fix is to give the tool that failed the proxy's address and your login for the proxy, not a new GitHub token.

Try it with curl first

This asks GitHub for a short line of text through the proxy (GitHub's Get the Zen of GitHub). Replace PROXY_HOST, PORT and PROXY_USER with the values from your administrator.

curl -i -x http://PROXY_HOST:PORT --proxy-user PROXY_USER:PROXY_PASSWORD https://api.github.com/zen

A line of text means the proxy and the login work. A 407 again means the proxy did not accept the login, or wants another method. The curl manual's options for this:

To review pull requests behind a proxy: Pull Request Inbox for GitHub, a plugin for JetBrains IDEs 2024.1 or later, connects through the IDE's HTTP proxy settings, so one entry there covers it.

git

git's git-config manual says http.proxy overrides the proxy normally set by the http_proxy, https_proxy and all_proxy environment variables, in the form [protocol://][user[:password]@]proxyhost[:port][/path]. With a user name and no password, git tries to get the password the way it does for other credentials, so it asks for it instead of storing it.

git config --global http.proxy http://PROXY_USER@PROXY_HOST:PORT

Or for one session, in PowerShell:

$env:https_proxy = "http://PROXY_USER@PROXY_HOST:PORT"

GitHub CLI

The GitHub CLI manual's page on environment variables (gh help environment) does not list a proxy variable. In the GitHub CLI's issue tracker, a maintainer answers that gh goes through a proxy with HTTPS_PROXY (not HTTP_PROXY, because gh mostly makes HTTPS requests), and that the "https" in the name is about the requests being proxied, not about how the proxy itself is reached; another maintainer notes that Go supports HTTP_PROXY and NO_PROXY and that the manual should document them better (cli/cli#2037). The login goes in the same address:

$env:HTTPS_PROXY = "http://PROXY_USER:PROXY_PASSWORD@PROXY_HOST:PORT"
gh auth status

In bash, export HTTPS_PROXY=... does the same. A password in an environment variable is visible to other programs started from that shell.

A JetBrains IDE

JetBrains' HTTP Proxy page: by default the IDE uses the system proxy settings. Under File | Settings | Appearance and Behavior | System Settings | HTTP Proxy (IntelliJ IDEA | Settings on macOS) choose Manual proxy configuration, then HTTP, fill Host name and Port number, tick Proxy authentication, and enter Login and Password. Remember keeps the password between sessions; without it, the IDE asks each time it first connects. Check Connection tests a URL through the proxy, https://api.github.com/zen for example.

What not to do

GitHub pull requests in IntelliJ IDEA

Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, connects through the IDE's HTTP proxy settings. When the proxy asks for a login and does not accept one, it says "The proxy asked for a login and did not accept one. Check Settings | Appearance & Behavior | System Settings | HTTP Proxy." The review inbox across repositories, diffs, viewed marks, conversations, merge checks and checks are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).

Get it on JetBrains Marketplace

GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.

More: GitHub Enterprise Server not reached · GitHub API request timed out · GitHub 401 "Bad credentials" · GitHub 404 "Not Found" · Connect to GitHub over SSH · GitHub token permissions for pull requests · 日本語