Quay environment variables dont showup in the test instance


#1

I have setup my quay username and password in the env vars for the project and when it runs the build it says it exports them. However when it gets to my deploy script I am getting a permission denied error when it tries to use those ENV vars. The other odd thing is if I ssh into the box and then run the deploy script then the vars work and there are no permissions errors. Please help.


#2

Hey,

Do you have anything you can show us? circle.yml or at least a snippet? Is the project open-source? Private? This will help us troubleshoot.


#3

I setup the ENV vars on the website not through the circle.yml file. Not sure that would be of any help to you. This is the line that it is failing on though. docker login -e "." -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io. QUAY_USERNAME and QUAY_PASSWORD are both set in the ENV vars on the project in the UI. I am also having the same problem in another repo I am testing on circle as well so the issue seems to be consistent. The project is private.


#4

Hmm. Would you be willing to PM the CircleCI link to your project so that I can take a look?

@levlaz, you set up Quay recently. Anything in particular I might be missing here?


#5

I have quay running on a public repo and I am able to log in without any issues.

@loganbfisher I copied the credentials from the Quay UI under Docker Login. I ran into one issue early on because the default password is super long and I copied it incorrectly.

The other odd thing is if I ssh into the box and then run the deploy script then the vars work

Can you SSH into the box and double check the docker login step to make sure that there are not additional errors? The proper output of a successful login should look like this:

docker login -e="." -u $DOCKER_USER -p $DOCKER_PASS quay.io
WARNING: login credentials saved in /home/ubuntu/.docker/config.json
Login Succeeded

#6

It turned out to be a file permissions problem. I just changed the permissions on my deploy script file and it worked perfectly.


#7

I ran into that exact same issue, but it manifested in a different step so that is why I did not think of it!


#8

I’m happy this got resolved. Thanks @loganbfisher, @levlaz.


#9