Comments (5)
This works for me.
- uses: google-github-actions/auth@v2
with:
project_id: ...
workload_identity_provider: ...
- run: gcloud auth configure-docker ${{ secrets.MY_REGISTRY }}
from login-action.
Closing, as I no longer use this action after this resolution. Not sure if there's a way to integrate using the gcloud credHelper into the action, but maybe it could be helpful in the future.
from login-action.
It is possible by adding the argument token_format: "access_token"
to the google-github-actions/auth@v2
action. Here is a link to the docs.
The access token can then be supplied through the password argument, i.e. password: "${{ steps.auth.outputs.access_token }}"
from login-action.
This works for me.
- uses: google-github-actions/auth@v2 with: project_id: ... workload_identity_provider: ... - run: gcloud auth configure-docker ${{ secrets.MY_REGISTRY }}
Thanks for this! Figured I could use the Docker login action, but I'll give this a try.
from login-action.
@mozisan do you have a full workflow example you could share? I'm trying gcloud auth configure-docker
, but the docker/build-push-action
is still failing with:
ERROR: failed to push us-central1-docker.pkg.dev/.../.../...: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://us-central1-docker.pkg.dev/v2/token?scope=repository%3A...%2F...%2F...%3Apull%2Cpush&service=us-central1-docker.pkg.dev: 403 Forbidden
(my repo-specific info removed)
EDIT: my issue was Step 5 -- the workload identity pool principalSet needed the IAM binding with artifact registry permissions
from login-action.
Related Issues (20)
- Support multi-user login HOT 1
- Request to bump dependencies HOT 1
- Usage with registry.hop.io
- docker login failure on macos self hosted runner HOT 2
- Public ECR login issue on Windows
- Harbor login issue: authentication required HOT 4
- It always fails While logining local-deployment Nexus HOT 1
- Login issue , secrate checked , not able to push to github registry , token working in local so not token issu HOT 1
- failed to authorize: failed to fetch anonymous token: unexpected status: 403 Forbidden HOT 3
- Support FIPS URLs HOT 2
- Support for DigitalOcean Container Registry HOT 2
- tls: failed to verify certificate: x509: certificate signed by unknown authority HOT 4
- Succefull registry login, but I'm getting x509 error during build. HOT 1
- Clarified documentation re: GAR + Workflow Identity Federation
- Fhcc HOT 2
- Fvv
- login-action step fails in Github pull request checks HOT 3
- Support for azure/login@v2? HOT 1
- Using private networking setup, docker/login-action says access denied to IP address HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from login-action.