Local excute failng with permision errors

Hello I am litterally just starting to use circle ci and docker and I want to run some tests on a personal django project of mine before I set circle CI up with GitHub I want to try and run it locally. But when I run circleci local execute I get the following error:

Starting container circleci/python:3.6
Warning: No authentication provided, using CircleCI credentials for pulls from Docker Hub.
  image is cached as circleci/python:3.6, but refreshing...
3.6: Pulling from circleci/python
Digest: sha256:c8a1c951dc2cb47ba325b188d8485616ea9390a3810e08b777f1f8d8f4686167
Status: Image is up to date for circleci/python:3.6
  pull stats: N/A
  time to create container: 28ms
  using image circleci/python@sha256:c8a1c951dc2cb47ba325b188d8485616ea9390a3810e08b777f1f8d8f4686167
Time to upload agent and config: 283.314694ms
Time to start containers: 602.072393ms
====>> Preparing environment variables
Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1616064485
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=build
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=
  CIRCLE_SHA1=
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1616064485
  CIRCLE_WORKING_DIRECTORY=~/project


The redacted variables listed above will be masked in run step output.====>> Checkout code
Making checkout directory "/home/circleci/project"
Copying files from "/tmp/_circleci_local_build_repo" to "/home/circleci/project"
Error: 
failed to copy files: fork/exec /bin/sh: permission denied

Step failed
Error: runner failed (exited with 101)
Task failed
Error: task failed

This is my config.yml:

 version: 2.1
 jobs:  
   build:
     docker:
       - image: circleci/python:3.6
     steps:
       - checkout
       - run:
           command: |
             python3 -m venv venv
             . venv/bin/activate
             pip install -r dev-requirements.txt
       - run:
           name: Running tests
           command: |
             . venv/bin/activate
             python3 ProjTroll/manage.py test

I have ownership to the .circleci folder so I’m suck. Please help

Hello @matth97,

Try using one of our newer next gen images: CircleCI Developer - Convenience Images

example (notice the cimg namespace):

jobs:
  build:
    docker:
      - image: cimg/python:3.9.2
    steps:
      - checkout
      - run: python --version

You may also be interested in checking out the Python orb for making config writing even easier:
https://circleci.com/developer/orbs/orb/circleci/python#usage-using-test-job

I was getting this error because my git repo I pulled from didn’t have write permissions on it for some reason, when I gave it read/write permissions it run.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.