Created
September 21, 2017 12:17
-
-
Save jugatsu/0d2267e9ca368ac7066cd0ec290b528c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ stage git:(terraform-service-account) ✗ /Users/ak/Downloads/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=ansible-gce.json | |
Activated service account credentials for: [[email protected]] | |
➜ stage git:(terraform-service-account) ✗ | |
➜ stage git:(terraform-service-account) ✗ | |
➜ stage git:(terraform-service-account) ✗ /Users/ak/Downloads/google-cloud-sdk/bin/gcloud compute instances list | |
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS | |
reddit-db europe-west1-b g1-small 10.132.0.2 35.189.235.188 RUNNING | |
➜ stage git:(terraform-service-account) ✗ | |
➜ stage git:(terraform-service-account) ✗ | |
➜ stage git:(terraform-service-account) ✗ | |
➜ stage git:(terraform-service-account) ✗ | |
➜ stage git:(terraform-service-account) ✗ ./gce.py --list | |
Traceback (most recent call last): | |
File "./gce.py", line 508, in <module> | |
GceInventory() | |
File "./gce.py", line 170, in __init__ | |
self.driver = self.get_gce_driver() | |
File "./gce.py", line 318, in get_gce_driver | |
gce = get_driver(Provider.GCE)(*args, **kwargs) | |
File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/gce.py", line 1801, in __init__ | |
self.zone_list = self.ex_list_zones() | |
File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/gce.py", line 2755, in ex_list_zones | |
response = self.connection.request(request, method='GET').object | |
File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/gce.py", line 121, in request | |
response = super(GCEConnection, self).request(*args, **kwargs) | |
File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 808, in request | |
*args, **kwargs) | |
File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 637, in request | |
response = responseCls(**kwargs) | |
File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 159, in __init__ | |
self.object = self.parse_body() | |
File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 296, in parse_body | |
raise GoogleBaseError(message, self.status, code) | |
libcloud.common.google.GoogleBaseError: {u'locationType': u'header', u'domain': u'global', u'message': u'Invalid Credentials', u'reason': u'authError', u'location': u'Authorization'} | |
Ini file | |
gce_service_account_email_address = [email protected] | |
gce_service_account_pem_file_path = ansible-gce.json | |
gce_project_id = otus-infra | |
gce_zone = europe-west1-b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment