`circleci build` fails after updating circleci command (0.0.5610-e7533b7 (2018-05-12T01:16:50+0000))



example: https://github.com/ikuwow/query_ok/blob/master/.circleci/config.yml#L9

$ circleci build

====>> Spin up Environment
Build-agent version 0.0.5610-e7533b7 (2018-05-12T01:16:50+0000)
Starting container circleci/ruby:2.4.4
  using image circleci/ruby@sha256:220868a4784846055941afb26926f81c7dec331f1c67385a29b0b61b458e2e72

Using build environment variables:

====>> Checkout code
mkdir -p /home/circleci/project && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/project
cp: cannot stat '/tmp/_circleci_local_build_repo/.': No such file or directory
Error: Exited with code 1
Step failed
Task failed

Local build failing on checkout
Circleci cli build fails in newest version

Is this in a local CircleCI system, or on the CircleCI cloud?


Local and a bug for me also on OSX


I am having similar issues also on OSX.


Yes, I’m also having this issue.


I have the same issue with Ubuntu 18.04


Same problem here! I can run the build with this command:

circleci build --repo-url="/fake-remote" --volume="/projects/test":"/fake-remote"


It works on my OSX 10.13.4.
Thank you


Yesterday, a new version fixing the problem was released! :slight_smile:


I am having similar issues also on CentOS7


Installed local cli today using

curl -o /usr/local/bin/circleci https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci && chmod +x /usr/local/bin/circleci

Same bug when trying to run locally with

circleci build --job test_integration

Git repository requires SSH access, but it works just fine with GIT itself (also works on remote builds).


I might have a solution, at least for me getting this error was related to a directory permission inside my .git folder.

repo/.git $ ls -alh | grep '.gitk'
drwx------  3 ligemer ligemer 4096 Aug 29 15:31 .gitk-tmp.Br3VQs/

I’m running Ubuntu 16.04.4

Tried docker system prune --all and updated binary. Same results. Sudo too.

     - image: circleci/python:3.6.6-stretch-node-browsers

Turns out when Circle copies over the directory, it does not reset the permissions on the folders. I’m not sure if this is a bug per-say but changing the permissions in my .git folder fixed this.

    ====>> Checkout code
#!/bin/bash -eo pipefail
mkdir -p /home/circleci/project && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/project
cp: cannot access '/tmp/_circleci_local_build_repo/./.git/.gitk-tmp.Br3VQs': Permission denied
Error: Exited with code 1
Step failed

Then fix the file:

chmod 775 -R .gitk-tmp.Br3VQs/

And run circle command again:

$ circleci build --job sanitize

    ====>> Checkout code
  #!/bin/bash -eo pipefail
mkdir -p /home/circleci/project && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/project


Same error on ubuntu 16.04 with updated circleci CLI on every project.