Do not have permission to access app while deploying google service account

Run the following command to check weather the project is associated with the correct account.

gcloud config list

If it is not associated with the account then use

gcloud auth login

to configure it with correct project account.


For those who are trying to deploy using a service account and the gcloud commands, you will need to set all of the following roles:

  • App Engine Deployer (deploy new code)
  • Storage Object Viewer (list images)
  • Storage Object Creator (upload the image)
  • Cloud Build Editor (create build)
  • App Engine Service Admin (promoting the new version)

From the access control docs:

The App Engine Deployer role alone grants adequate permission to deploy using the Admin API. To use other App Engine tooling, like gcloud commands, you must also have the Storage Admin role and Cloud Build Editor role.


If you are trying to deploy a node app this may still be insufficient. My API was enabled and I followed everything on GCP's instructions, however I still got the You do not have permission to access app error. Finally fixed it by adding two more roles to the service account:

  • Project > Browser
  • Cloud Build > Cloud Build Service Account

Have got it working now.

$ gcloud app deploy --log-http --verbosity=debug

The reason why it was failing, seemed to be related to enabling the App Engine API (link was shown in command output). Enable the api - then try deploying again (this time without --log-http as this is resulting in a gcloud crash).

You can enable the "Google App Engine Admin API" through the Google Cloud Platform API console page. https://console.cloud.google.com/apis/api/appengine.googleapis.com/