1

I am trying to test a job locally with the circleci cli: circleci local execute --job <JOB_NAME>

I have Docker running on my computer and am signed into an account that has access to the images referenced by the circleci job. I have even managed to pull the images manually onto my local docker.

This is the error I get when running the circleci cli command for running the job locally:

Error response from daemon: pull access denied for <IMAGE_NAME>, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

My ./circleci/config.yml contains auth entries with $DOCKERHUB_USER and $DOCKERHUB_PASSWORD but I am not entirely sure where/how to set those locally.

Any thoughts?

  • try this post I found some useful information about your question https://stackoverflow.com/questions/41984399/denied-requested-access-to-the-resource-is-denied-docker if its not working it might be a typo you did in the name of the image if or the image dont exist – Shad0w Nov 24 '20 at 18:28
  • Thank you @Shad0w, I am able to pull the image using docker commands so that tells me the name of the image is correct. The circleci job runs just fine in the cloud, it is only when I try to run it locally that I get that error about not being logged in -- even though I am logged into docker. – user14701197 Nov 24 '20 at 18:43
  • run ```docker login``` at first time when you run any other docker commands. did you do that? I know its a dumb question but it might be that you forgot to do login it happens sometime to me when using anything that required to enter first login command. – Shad0w Nov 24 '20 at 18:58
  • Yes, I had run `docker login` and authenticated successfully prior to running `circleci local execute --job `. That command output gives me: `Error response from daemon: pull access denied for , repository does not exist or may require 'docker login': denied: requested access to the resource is denied` BUT I am able to successfully, in the same terminal window, pull the image: `docker pull `. I think this has to do with setting up the [Context](https://circleci.com/docs/2.0/contexts/) or environment variables for `$DOCKERHUB_USER` and `$DOCKERHUB_PASSWORD` – user14701197 Nov 24 '20 at 19:15
  • maybe. here some reminders of things that might have a connection with your error ```docker login``` should always be followed by ```docker push``` , ```sudo docker login``` should always be followed by ```sudo docker push``` , conform your email. I am sorry if I come up as asking/giving the most stupid question/answers but sometime it do be the easiest things that we tend to miss up. – Shad0w Nov 24 '20 at 19:29

0 Answers0