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:

  1. In Visual Studio Code, open your user or workspace settings.
  2. Configure http.proxy to point at your HTTP proxy.
  3. Restart Visual Studio Code to ensure connections to GitLab use the latest proxy settings.

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:

  1. Open your user or workspace settings.
  2. Configure http.proxy, including username and password, to authenticate with your HTTP proxy.
  3. Restart Visual Studio Code to ensure connections to GitLab use the latest proxy settings.
note
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.
note
Bearer authentication is proposed in issue 548.