Skip to content

Avoid populating runner home with system defaults

Antoine Barbaroux requested to merge ubarbaxor/gitlab-runner:fix-3849 into master

👋 Superseded by !1934 (merged) 👋

What does this MR do?

This should fix issue where build crashes early with "no such file or directory" when trying to clone the repo.

Why was this MR needed?

In some cases, default dotfiles cause crashes of shell runner as installed with package repositories.
Debian 10 "Buster" notably has a .bash_logout which cause it. See forum post here and associated issues.

Are there points in the code the reviewer needs to double check?

I don't think so, but I'd be happy to edit if need be.
Not absolutely sure if the -k /dev/null works universally or is implementation dependent.
-k / --skell normally takes a directory, but in this case it works.
An alternative would be to point it to a newly generated temp dir as in -k $(mktemp).

Does this MR meet the acceptance criteria?

  • Documentation created/updated
    Doesn't seem applicable
  • Added tests for this feature/bug
    Replicated bug on some docker containers on a build here
  • In case of conflicts with master - branch was rebased
    No conflicts with master

What are the relevant issue numbers?

#3849 (closed) and maybe some cases of #1379 (closed) #4449 (closed)

Edited by Steve Xuereb

Merge request reports