New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage Object Get Access Error #105
Comments
|
This page might help explain the error or at least point towards workarounds. The error quit happening when I tried either of this ^ page's options for viewing logs:
I'm still surprised I ran into this issue. It feels like the Cloud Build documentation is missing some required grants. |
|
I ran into this today as well and as a beginner with Google Cloud this was a huge set back. I sat here troubleshooting redeploy after redeploy until this morning when I found them in my Container Registry and realized my builds were not failing after all.
The documentation for GCP and any of its services is 50/50 at best. I've been scouring GCP documentation for the last month for various things and most of their docs are referencing one partial service of the entire workflow very vaguely or it's missing any relevant and helpful documentation to actually get something working. Service Accounts and IAM are the worst offenders. I've been leaving a trail of feedback. |
|
Thanks to @agray-22 's comment, I can confirm that explicitly adding the It is not clear to me why |
|
You should not set Viewer role which is too huge (project-wide). As @agray-22 explained, setting |
|
I had a similar problem than the OP, but in my case it was because I gave my service account the |
|
read and access to all reports and post with easy step for new user , like other face book and instagram application |
|
Data storage problem |
|
Thanks |
|
Hello I also confirm that the role viewer solved this issue for us ! Thanks a lot ! |
|
Can also confirm that the role viewer solved this issue for us but its bit strange as we already have storage admin role. |
|
I can get this to work without viewer role by granting That said, looks like this is lack of documentation on GCP rather than issue on this action. |
|
Adding the |
|
Giving the Cloud Build service account a The |
|
Giving a service account view privilege in the whole project cannot be taken as a solution for production environment, that defuses the whole purpose of having service accounts. |
|
If anyone's still having this issue (of service account does not have access to the Google Cloud Storage object) and doesn't want to give the Project
Add a new secret key for BUCKET_ID which has the value of the bucket id of the cloud storage bucket into your Github keys and then your YAML should look something like this: ...
- name: Build and Push
run: |-
gcloud builds submit \
--quiet \
--gcs-log-dir "gs://$BUCKET_ID" \
--tag "gcr.io/$PROJECT_ID/$REPOSITORY_NAME:$GITHUB_SHA"
... |

rgreinho commentedMay 15, 2020
•
edited
TL;DR
When using the cloudbuild workflow, the action job reports as failing due to a storage access error. However the job is correctly triggered in cloudbuild and completes successfully.
My problem seems similar to the one described in #49, but as I needed some clarification I opened this issue.
Expected behavior
The workflow would complete successfully
Observed behavior
The error message:
Following the logs link I can see that everything ran fine in spite of the error:
Reproduction
Action YAML
Additional information
As a workaround, I added a JSON key to the service account which got automatically created by GCP (
ID-compute@developer.gserviceaccount.com), use it to authenticate this action and it worked like a charm.EDIT(June 21st 2020):
roles/viewer.The text was updated successfully, but these errors were encountered: