-
Notifications
You must be signed in to change notification settings - Fork 950
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
Creation of Github Actions workflow fails due to max number of keys limit for service account #6145
Comments
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information. |
Hi @hugo2410, I’m trying to repro the issue you’re encountering, but so far, I’m unable to replicate the error you mentioned. After setting up the GitHub Action using Could you let me know if I’m missing anything here to properly replicate the issue? It would be helpful if you could provide details on the steps you took. Also, from what I can tell you’re using |
I have just updated to the latest version of firebase-tools : 12.4.5 |
I’ve tried a couple of times to repro this, but so far I’m having no luck trying to replicate the issue. If you can provide any additional details on the steps you took, it is highly appreciated. It seems like the process is failing when creating the service account key, I’m thinking it might be related to your project’s configuration or there may be an org policy in place that is preventing the creation of service account keys. Could you try manually creating a service account key to see if it’s an org policy issue? It’s also possible that you may have hit the max limit of keys in a service account. As mentioned in this page, a service account can have up to 10 keys. If you’ve hit the limit, you could delete at least one of the old unused keys, which will allow you to generate a new one. |
@aalej the issue was that the service account had indeed reached the maximum number of keys. Thanks for helping! |
[REQUIRED] Environment info
11.25.2
11.25.2
Ubuntu 22.04
[REQUIRED] Test case
I had setup the github actions workflow succesfully in the past, I decided to remove it directly in git, without changing the config in firebase and when i try to set it up again it fails. I have removed the secrets for the repo and have deleted the service account called githubactions-*****
[REQUIRED] Steps to reproduce
firebase init hosting:github --debug
[REQUIRED] Expected behavior
Workflow succeeds and sets up github actions
[REQUIRED] Actual behavior
2023-07-18T16:53:55.604Z] >>> [apiv2][query] POST https://iam.googleapis.com/v1/projects/portatoapp/serviceAccounts/[email protected]/keys [none]
[2023-07-18T16:53:55.605Z] >>> [apiv2][body] POST https://iam.googleapis.com/v1/projects/portatoapp/serviceAccounts/[email protected]/keys {"keyAlgorithm":"KEY_ALG_UNSPECIFIED","privateKeyType":"TYPE_GOOGLE_CREDENTIALS_FILE"}
⠼ Retrieving a service account.[2023-07-18T16:53:56.419Z] <<< [apiv2][status] POST https://iam.googleapis.com/v1/projects/portatoapp/serviceAccounts/[email protected]/keys 400
[2023-07-18T16:53:56.419Z] <<< [apiv2][body] POST https://iam.googleapis.com/v1/projects/portatoapp/serviceAccounts/[email protected]/keys {"error":{"code":400,"message":"Precondition check failed.","status":"FAILED_PRECONDITION"}}
Error: HTTP Error: 400, Precondition check failed.
[2023-07-18T16:53:56.567Z] Error Context: {
"body": {
"error": {
"code": 400,
"message": "Precondition check failed.",
"status": "FAILED_PRECONDITION"
}
},
"response": {
"statusCode": 400
}
}
I didnt post the full logs as I'm worried there might be some secrets to access my repo
The text was updated successfully, but these errors were encountered: