macOS runner hangs fetching changes

If git was installed using brew on macOS, the default configuration in /usr/local/etc/gitconfig includes osxkeychain as a credential helper.

[credential]
	helper = osxkeychain

This can cause the runner to hang fetching changes. To solve the issue several approaches can be taken:

Remove the setting system-wide

git config --system --unset credential.helper

Override the setting for the gitlab-runner user

git config --global --add credential.helper ''