Problem
Unable to connect to GitLab through the ‘Log in to GitLab.com’ option. After clicking the login button in the browser, the following message appears:
Token exchange failed on this URL > http://127.0.0.1:63342/api/gitlab/oauth?result=failure&message=Token+exchange+failed2026-11-03 11:30:26 WARN #o.j.p.g.a.GitLabLoginUtil - GitLab OAuth login failed
GitLabOAuthFlowException: Token exchange failed (GitLabOAuthService.kt:168)
Caused by: java.net.ConnectException
at jdk.internal.net.http.PlainTunnelingConnection.connectAsync
at jdk.internal.net.http.AsyncSSLTunnelConnection.connectAsync
Caused by: java.nio.channels.UnresolvedAddressExceptionCause
IDE is unable to connect to the proxy configured in Settings | Appearance & Behavior | System Settings | HTTP Proxy. This proxy misconfiguration prevents completing the GitLab authentication flow.
Resolution
- Open Settings | Appearance & Behavior | System Settings | HTTP Proxy.
- Check the proxy configuration and use the Check Connection button. Enter
https://gitlab.comin the prompt to test the connection. - If the connection fails, check if you can avoid using proxy in your environment. If yes, set the proxy type to No proxy, then test the connection again.
- If the connection is successful without proxy, log in to GitLab again or re-add the GitLab account in Settings | Version Control | GitLab.
If the issue persists, collect logs via Help | Collect Logs and Diagnostic Data after the failed login attempt and share the archive with support.
Comments
0 comments
Please sign in to leave a comment.