Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gitlab-runner gitlab-runner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,477
    • Issues 2,477
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 121
    • Merge requests 121
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #1379
Closed
Open
Created Jun 06, 2016 by Fabrizio Lungo@flungo

Build occasionally get "No such file or directory" accessing build directory

Overview

Every couple of builds (it not common but maybe 1 in 10 builds) will get an error when the runner starts:

/bin/bash: line 20: cd: /builds/GROUP/Project: No such file or directory

I am using the docker executor. Are there any ideas why occasionally this directory will not be available? Neither the build log or runner logs show anything else out of the ordinary.

Workaround

As explained in #4449 (comment 189923147) and #4449 (comment 189959431) #1379 (comment 220176045) #1379 (comment 204389790) this is because of the default content of ~/.bash_loguout below:

if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi

Proposal

MR 1523 from @ubarbaxor is currently being investigated as a potential solution for this issue. We will target the 12.7 release milestone for resolving this issue, depending on the progress made in advancing that MR.

In #4449 (closed) we are also discussing possible solutions.

Update documentation for the shell and ssh executor to make it clear that we load the user profile.

Update https://docs.gitlab.com/runner/faq/README.html to include this as a common error.

Merge requests

  • Update error message and documentation
  • Disalbe skel populatation for GitLabRunner user
  • Fix comment on post-install script
Edited Mar 23, 2020 by Steve Azzopardi
Assignee
Assign to
Time tracking