You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In many enterprise environments, internet access to external services may need to be routed through HTTP/HTTPS proxies for security and monitoring. This requires applications to be aware of and use these proxies when making network requests.
Proxy settings are often provided via environment variables such as HTTP_PROXY, HTTPS_PROXY, and NO_PROXY.
But when I set these variables to access our Gitlab server through our proxy server, Sourcebot generate this error:
[backend] | 2026-01-16T21:14:13.021Z �[31merror�[39m: [gitlab] Failed to fetch projects for group my-group. fetch failed
[backend] | TypeError: fetch failed
[backend] | at node:internal/deps/undici/undici:13392:13
[backend] | at processTicksAndRejections (node:internal/process/task_queues:95:5)
[backend] | at runNextTicks (node:internal/process/task_queues:64:3)
[backend] | at process.processImmediate (node:internal/timers:454:9)
[backend] | at async defaultRequestHandler (file:///app/node_modules/@gitbeaker/rest/dist/index.mjs:67:22)
[backend] | at async file:///app/node_modules/@gitbeaker/core/dist/index.mjs:99:22
[backend] | at async fetchWithRetry (file:///app/packages/backend/dist/utils.js:69:20)
[backend] | at async measure (file:///app/packages/backend/dist/utils.js:9:18)
[backend] | at async file:///app/packages/backend/dist/gitlab.js:75:46
[backend] | at async Promise.allSettled (index 0)
It would be great if we can use an HTTP Proxy with Sourcebot.
If it can help, Node.js supports HTTP_PROXY, HTTPS_PROXY, and NO_PROXY variables when NODE_USE_ENV_PROXY variable or --use-env-proxy CLI option is enabled. This works with node:http and node:https (v22.21.0 or v24.5.0+) methods as well as fetch() (v22.21.0 or v24.0.0+): https://nodejs.org/en/learn/http/enterprise-network-configuration#proxy-configuration
With gitbeaker lib used to fetch Gitlab API in Sourcebot, it should be also possible to define an Agent: jdalrymple/gitbeaker#3716 (comment)
e.g. something like:
If it can help, Node.js supports HTTP_PROXY, HTTPS_PROXY, and NO_PROXY variables when NODE_USE_ENV_PROXY variable or --use-env-proxy CLI option is enabled. This works with node:http and node:https (v22.21.0 or v24.5.0+) methods as well as fetch() (v22.21.0 or v24.0.0+): https://nodejs.org/en/learn/http/enterprise-network-configuration#proxy-configuration
@philippe-granet could you try setting these environment vars on your Sourcebot instance? My guess is that it should just work, at least according to the nodejs docs.
Activity
philippe-granet commentedon Jan 16, 2026
With
gitbeakerlib used to fetch Gitlab API in Sourcebot, it should be also possible to define an Agent:jdalrymple/gitbeaker#3716 (comment)
e.g. something like:
msukkari commentedon Jan 16, 2026
Thanks for raising @philippe-granet! Is this blocking your team from deploying Sourcebot?
brendan-kellam commentedon Jan 17, 2026
@philippe-granet could you try setting these environment vars on your Sourcebot instance? My guess is that it should just work, at least according to the nodejs docs.
philippe-granet commentedon Jan 17, 2026
It doesn't work because I use the Sourcebot Docker image ships with Node v20.18.1, while these variables requires Node >= v22.21.0 or v24.5.0+:
sourcebot/Dockerfile
Line 18 in 2c0b583
brendan-kellam commentedon Jan 17, 2026
hmm ok, I can look into upgrade node versions, shouldn't be a issue
brendan-kellam commentedon Jan 20, 2026
@philippe-granet shipped the change in #753 - lmk if it works for you
philippe-granet commentedon Jan 23, 2026
Yes it works, thanks a lot !