Skip to content

go-build: "git: not found" after updating from 2.2.0 to 3.2.0

Describe the bug

I just updated from 2.2.0 to 3.2.0 and I'm getting this error with the go-build job: "git: not found".

Expected behavior

go-build job runs successfully

Actual behavior

go-build job fails

Logs and/or screenshots

$ ( # collapsed multi-line command
$ # BEGSCRIPT # collapsed multi-line command
$ git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
/scripts-115030-43700094/step_script: eval: line 398: git: not found
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: command terminated with exit code 127

That's weird because I've no error with the other jobs that are using the same command (git config...).

Here are my variables:

variables:
  GIT_STRATEGY: fetch
  GO_IMAGE: golang:1.19-alpine3.16
  GO_BUILD_FLAGS: -mod=readonly -buildvcs=false
  GO_TEST_IMAGE: golang:1.19-buster
  GO_TEST_FLAGS: -mod=readonly -v -race -vet=off
  GO_CI_LINT_IMAGE: golangci/golangci-lint:v1.49.0-alpine
  GO_CI_LINT_ARGS: ./...
Edited by Boris