2017-08-14 8 views
0

雖然使用Google的SDK,但我可以創建一個雲數據庫實例,但我無法通過Google的sqladmin庫創建它。無法通過Google sql庫創建gcloud cloudsql實例。 (未授權提出此請求)

我不斷收到

googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/sql/v1beta4/projects/kentik-testing-175821/instances?alt=json returned "The client is not authorized to make this request.">

我已經按照這些說明https://cloud.google.com/compute/docs/tutorials/python-guide

任何幫助將不勝感激。一直呆在這個週末。

這是我相信的歷史。很難說,因爲我厭倦了這麼多的事情。 625 gcloud auth application-default login 626 gcloud auth application-default login 627 unset GOOGLE_APPLICATION_CREDENTIALS 628 pip3 install --upgrade google-api-python-client 629 gcloud auth application-default login 630 env 631 env | grep GOOGLE 632 ls 633 kentik 634 cd intern-test-suite/ 635 ls 636 chmod +x test.py 637 ./test.py 638 gcloud projects status 639 gcloud projects list 640 ./test.py kentik-testing-175821 641 ./test.py kentik-testing-175821 rsim-testing 642 cd 643 ls 644 which gcloud 645 gcloud auth login 646 gcloud auth application-default --help 647 history

+0

你做了什麼後的歷史請 – Erich

+0

我輸入的歷史是否有幫助? –

回答

0

我必須將env GOOGLE_APPLICATION_CREDENTIALS =設置爲SDK創建證書所在的位置。根據

export GOOGLE_APPLICATION_CREDENTIALS=/Users/<YOUR USER NAME>/.config/gcloud/application_default_credentials.json

我的documentation你沒有需要做到這一點,但它似乎是我的修補程序。