You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am writing a Github workflow like below to pull and run a GCR private image on my GCP compute instance. GCP compute instance is not Container-Optimized OS, its self managed running Ubuntu 18.4 and Docker version 19.03.4. I configured all service account related stuff. I am getting unauthorized error when running docker pull gcr command through compute-ssh workflow, while it runs fine when I run directly on a compute instance SSH for the same user. Please suggest.
Expected behavior
As GCR image gets pull successfully when command gets executed directly on the instance SSH console that mean instance and user account has right privilege. Through GitHub workflow GCR image should also get pulled without an error.
Hi @FrodoTheTrue, I just replaced the actual values for the security reasons. Hope that helps.
To add little more context to the issue, after ssh-compute to the instance I want to run docker pull from gcr and gsutil command to perform some deployment activities. For the gsutil I am getting "bash: gsutil: command not found" and for docker getting unauthorized. When running my deployment script by ssh into instance directly not through GitHub actions all goes well.
which local user context this ssh-compute gets? or under which user context specified command gets run?
Hi there! I'm encountering a similar issue. I noticed your previous post about it. Were you able to resolve the problem? I'd appreciate any insights or solutions you might have. Thanks in advance!
TL;DR
Hi,
I am writing a Github workflow like below to pull and run a GCR private image on my GCP compute instance. GCP compute instance is not Container-Optimized OS, its self managed running Ubuntu 18.4 and Docker version 19.03.4. I configured all service account related stuff. I am getting unauthorized error when running docker pull gcr command through compute-ssh workflow, while it runs fine when I run directly on a compute instance SSH for the same user. Please suggest.
Expected behavior
As GCR image gets pull successfully when command gets executed directly on the instance SSH console that mean instance and user account has right privilege. Through GitHub workflow GCR image should also get pulled without an error.
Observed behavior
Error response from daemon: unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
Action YAML
Log output
Additional information
Direct SSH Run Detail
puneet_garg@instance:~/.ssh$ docker pull gcr.io/project-id/image-name@sha
sha: Pulling from neo4j-solutions-demos/movies-demo
530afca65e2e: Pull complete
323a7915bc04: Pull complete
b5b558620e40: Pull complete
b37be0d2bf3c: Pull complete
ba036c7f95ec: Pull complete
a46fd6a16a7c: Pull complete
7b72cae89631: Pull complete
216cf4da2568: Pull complete
Digest: sha
Status: Downloaded newer image for gcr.io/project-id/image-name@sha
gcr.io/project-id/image-name@sha
Configuration Articles Followed
https://cloud.google.com/container-registry/docs/access-control#vm-push
The text was updated successfully, but these errors were encountered: