Go image does not contain git

Summary

The hidden job .go injects golang:1.25.5-alpine3.22 as the base image for all Go-related jobs. The alpine-based image intentionally does not include go dependencies such as git to make the image minimal.

As a result, basic jobs such as go_mod_download fail with the following error:

Initialized empty Git repository in /builds/path/to/project/.git/
Created fresh repository.
Checking out 664c20da as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache
00:01
Checking cache for project-go-protected...
WARNING: file does not exist                       
Failed to extract cache
Executing "step_script" stage of the job script
00:05
$ echo "prepare container" && # collapsed multi-line command
prepare container
$ mkdir -p .go
$ go mod download
go: gitlab.corp.org/path/to/dependency@v0.0.0-20251019135127-6dbafdbdee6c: git init --bare in /builds/path/to/project/.go/pkg/mod/cache/vcs/24082f2f33f7eea6c9885f2afdbc3763f4e216f81cd6335bfadec8a3d2a432e4: exec: "git": executable file not found in $PATH

It would be really nice if the jobs defaulted to the regular, Debian-based golang image. WDYT?

Edited by Vojtěch Hauser