Clone error: Unable to create ‘/codefresh/volume/reponame/.git/index.lock’: File exists

Overview

When running a clone step, you see this message:

fatal: Unable to create '/codefresh/volume/reponame/.git/index.lock': File exists

Details

A stale volume may have crashed, leaving behind a lock file in the cache.

Re-run the build with a cleared file cache.

  1. Open the pipeline
  2. Select Run
  3. Click Advanced Options
  4. Select Ignore Docker engine cache for build and Reset pipeline volume
  5. Run the build

This will reset the volume and clear out any stale files.

The Shared Volume