DEV Community

Pradeep Kumar
Pradeep Kumar

Posted on • Updated on

[Solved] GitLab Runner : ERROR: Job failed: prepare environment: Process exited with status 1. Check...

If you are getting following error in your when running gitlab ci/cd job via gitlab-runner:

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
Enter fullscreen mode Exit fullscreen mode

Solution

Run following command:

find / -name .bash_logout
Enter fullscreen mode Exit fullscreen mode

and delete following files if exist

sudo rm -r /home/gitlab-runner/.bash_logout
sudo rm -r /home/<username>/.bash_logout
Enter fullscreen mode Exit fullscreen mode

Try to re-run the jobs it should be working.

Read More at: Common Gitlab Runner errors and solutions

Top comments (4)

Collapse
 
taoliax profile image
whatever,with your plasure

It works for me!
Could you tell me why this would work?

Collapse
 
rumanhuq profile image
Ruman

Thanks a bunch!

Collapse
 
neo1989 profile image
Neo

You saved me. Thanks so much.

Collapse
 
themodernpk profile image
Pradeep Kumar

@neo1989 you're most welcome :), feel free to bookmark dev.to/themodernpk/gitlab-runner-e...