Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project

I am running into this error while deploying my django(2.1) app with python(3.5) to appengine. Before, I was using python 2 and python27 in app.yaml, there was no such error, but now when I have python 3.5.2 and python37 in my app.yaml, I am running into this error after "gcloud app deploy". Do I really have to enable billing or am I doing something wrong? Is there a way out? The full error is

ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project chaipani-217815 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=chaipani-217815 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

like image 824
Salman Haseeb Sheikh Avatar asked Sep 28 '18 19:09

Salman Haseeb Sheikh


4 Answers

We ran in to an issue where an incomplete deploy (that hung and had to be aborted) had errors setting some internal service account permissions and kept getting the "Cloud Build has not been used in project before or it is disabled" error despite the Cloud Build API being enabled and a billing account set up.

We solved the issue by disabling the Cloud Build API, waiting a couple hours (to ensure the service accounts were deleted), and then re-enabling.

like image 174
Kelly Avatar answered Sep 21 '22 19:09

Kelly


You go that link then click "Enable" button. A popup showed, then click to Set account. (see the picture)

Enable cloud build

like image 4
Bai Nguyen Avatar answered Nov 02 '22 20:11

Bai Nguyen


You must enable billing first, then you can enable the Cloud Build service for your project.

like image 13
Dustin Ingram Avatar answered Nov 02 '22 21:11

Dustin Ingram


I solved this problem using the following commands at the root directory of my project:

gcloud init
gcloud components update

After I updated the project settings with my GCP account the problem was solved.

like image 5
ℛɑƒæĿᴿᴹᴿ Avatar answered Nov 02 '22 20:11

ℛɑƒæĿᴿᴹᴿ