Terminal prompt disabled on GitLab Runner 18.6.1 with shell executor

After updating the GitLab Runner to version 18.6.x we noticed all the pipelines failing with the following error:

fatal: could not read Username for 'https://gitlab.xxxxxxx.xxx': terminal prompts disabled
Retrying in 5s
Cleaning up project directory and file based variables

Our Runners are linux based, with the shell executor. The same update on a kubernetes based runner worked like a charm.

To fix the problem we had to delete the builds folder:

rm -rf /home/gitlab-runner/builds/*

This solved the problem.

A discussion on this is also happening on the forum: https://forum.gitlab.com/t/fatal-could-not-read-username-for-gitlab-terminal-prompts-disabled/131509/8

Tested this against multiple GitLab Server on various 18.x versions, same behaviour

Edited by Cristiano Casella