2017-08-14 7 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你没有需要做到这一点,但它似乎是我的修补程序。