`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:
  BASH_ENV=/tmp/.bash_env-localbuild-1526111429
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=build
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=git@github.com:ikuwow/query_ok.git
  CIRCLE_SHA1=278c6c954d455d248fd0f476cafa0812e321689e
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1526111429
  CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code
  #!/bin/sh
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
2 Likes

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"

2 Likes

It works on my OSX 10.13.4.
Thank you

1 Like

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

1 Like

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).

1 Like

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.

  docker:    
     - 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.

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