Unable to create directory on checkout


#1

I’m getting an error that the circle checkout step is unable to create my workdir.

Here’s the first few lines of my circle.yml:

version: 2
executorType: machine
containerInfo:
  - image: ruby:2.2.5
  - image: postgres:9.5
    env:
      - POSTGRES_USER=root
  - image: redis:latest

stages:
  build:
    workdir: cabbagepult
    environment:
      RAILS_ENV: test
      DATABASE_URL: postgres://postgres@127.0.0.1:5432/cabbagepult_test
    steps:
      - type: shell
        command: pwd; whoami; ls -al
      - type: checkout

The output of the pwd ... step:

/home/circleci/cabbagepult
circleci
total 8
drwxrwxr-x  2 circleci circleci 4096 Mar  6 20:22 .
drwxr-xr-x 16 circleci circleci 4096 Mar  6 20:22 ..

The error is at the bottom of the checkout step:

mkdir: cannot create directory ‘cabbagepult’: Permission denied
Exited with code 1

It works ok if I switch the executorType to “docker”, but I needed the “machine” executor to do some things with docker-compose.


#2