diff mbox series

fetch: Add GIT_CONFIG_GLOBAL to FETCH_EXPORT_VARS

Message ID 20260227124336.294694-1-florian.schmaus@codasip.com
State New
Headers show
Series fetch: Add GIT_CONFIG_GLOBAL to FETCH_EXPORT_VARS | expand

Commit Message

Florian Schmaus Feb. 27, 2026, 12:43 p.m. UTC
Many CI setups rely on the GIT_CONFIG_GLOBAL environment variable to
define project-specific gitconfigs, often to inject credentials using
git's url.<base>.insteadOf configuration.

However, BitBake restricts the environment variables passed to the
fetch task to a fixed list (FETCH_EXPORT_VARS). Because
GIT_CONFIG_GLOBAL is missing from this default list, the variable is
stripped from the environment.

Add GIT_CONFIG_GLOBAL to FETCH_EXPORT_VARS to natively support this
credential injection method (and GIT_CONFIG_GLOBAL in general). This
also eliminates confusion for users who expect the variable to
propagate after adding it to `BB_ENV_PASSTHROUGH_ADDITIONS`, only to
find it has no effect during the fetch task.

Signed-off-by: Florian Schmaus <florian.schmaus@codasip.com>
---
 lib/bb/fetch2/__init__.py | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index dcf7adc26abe..aaefd860204a 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -877,6 +877,7 @@  FETCH_EXPORT_VARS = ['HOME', 'PATH',
                      'FTPS_PROXY', 'ftps_proxy',
                      'NO_PROXY', 'no_proxy',
                      'ALL_PROXY', 'all_proxy',
+                     'GIT_CONFIG_GLOBAL',
                      'GIT_PROXY_COMMAND',
                      'GIT_SSH',
                      'GIT_SSH_COMMAND',