Getting Started: Go



Documentation for this topic is now available on our documentation site:


I’m trying to use executorType: machine with Go due to an issue with volume mounting with the executorType: docker. When I try to set my workDir to /go/src/ I get this error:

mkdir: cannot create directory ‘/go’: Permission denied

This worked on the executorType: docker, so are the permissions different when using the executorType: machine? Would you happen to have any examples of Go used on executorType: machine?


That does seem odd. Can you check the permissions on /go? Is it created first? As root, you should not run into any permission errors.

Perhaps you can try throwing a sudo in there?


Here’s the YAML format I’m using:

executorType: machine
    parallel: 2
    workDir: /go/src/
      - type: shell
        name: Initialize working directory
        pwd: /
        command: |
          sudo mkdir -p /go/src/
      - type: checkout```

When this gets to the checkout stage I receive this error:

```Cloning into '.'...
/go/src/ Permission denied
Exited with code 1```

Is there any way I can get the step `type: checkout` to run in sudo?


Can you put the checkout step first?