GitLab Language Server
The GitLab Language Server powers various GitLab editor extensions across IDEs.
Configure the Language Server to use a proxy
The gitlab-lsp
child process uses the proxy-from-env
NPM module to determine proxy settings from these environment variables:
-
NO_PROXY
-
HTTPS_PROXY
-
http_proxy
(in lower case)
To configure the Language Server to use a proxy:
Visual Studio Code
- In Visual Studio Code, open your user or workspace settings.
- Configure
http.proxy
to point at your HTTP proxy. - Restart Visual Studio Code to ensure connections to GitLab use the latest proxy settings.
JetBrains IDEs
- In your JetBrains IDE, configure the HTTP Proxy settings.
- Restart your IDE to ensure connections to GitLab use the latest proxy settings.
- From the Tools > GitLab Duo menu, select Verify setup. Make sure the health check passes.
Troubleshooting
Enable proxy authentication
You might encounter a 407 Access Denied (authentication_failed)
error when using an authenticated proxy:
Request failed: Can't add GitLab account for https://gitlab.com. Check your instance URL and network connection.
Fetching resource from https://gitlab.com/api/v4/personal_access_tokens/self failed
To enable proxy authentication in the Language Server, follow the steps for your IDE:
Visual Studio Code
- Open your user or workspace settings.
- Configure
http.proxy
, including username and password, to authenticate with your HTTP proxy. - Restart Visual Studio Code to ensure connections to GitLab use the latest proxy settings.
The VS Code extension does not support the legacy
http.proxyAuthorization
setting in VS Code for authenticating the language server with an HTTP proxy. Support is proposed in
issue 1672.JetBrains IDEs
- Configure HTTP Proxy settings in your JetBrains IDE.
- If using Manual proxy configuration, enter your credentials under Proxy authentication and select Remember.
- Restart your JetBrains IDE to ensure connections to GitLab use the latest proxy settings.
- From the Tools > GitLab Duo menu, select Verify setup. Make sure the health check passes.
Bearer authentication is proposed in issue 548.