If you are getting following error in your when running gitlab ci/cd job via
ERROR: Job failed: prepare environment: Process exited with status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
Run following command:
find / -name .bash_logout
and delete following files if exist
sudo rm -r /home/gitlab-runner/.bash_logout sudo rm -r /home/<username>/.bash_logout
Try to re-run the jobs it should be working.
Read More at: Common Gitlab Runner errors and solutions