Google App Engine PHP (standard): Permissions error fetching application

96 Views Asked by At

Every now and then I lose the permissions for a project to be deployed via Google App Engine PHP.

HttpException: Permissions error fetching application [apps/PROJECT_ID]. Please make sure you are using the correct project ID and that you have permission to view applications on the project.

I use Jenkins, and I can see via the config history that nothing changed. Even if I escalate the privileges to "project owner" in console.cloud.google.com - same results: permissions denied.

The only way I am able to solve this issue is create a complete new app engine project.

Question: why do IAM accounts expire, and what is the recommended way of using credentials to automate deploys with Google App Engine PHP ?

2

There are 2 best solutions below

0
On BEST ANSWER

I was able to solve it by appending --configuration CONFIG_NAME additionally to my gcloud app deploy command. I don't know why some projects work by just specifying the --project arg, and others not.

In any case it seems cleaner to always explicitly set the configuration-arg per gcloud command

1
On

I had this error message and for me the error was due to switching projects by using "gcloud config set project PROJECT_NAME" instead of "gcloud config set project PROJECT_ID".