如何在Google云存储中获取GS_SECRET_ACCESS_KEY和GS_ACCESS_KEY_ID

问题描述 投票:0回答:1

我尝试使用Landsat图像从公共Google云存储(https://console.cloud.google.com/storage/browser/gcp-public-data-landsat)中读取数据。

我使用带有GDAL的Python3。但是我有一个错误

ERROR 15: GS_SECRET_ACCESS_KEY+GS_ACCESS_KEY_ID, GS_OAUTH2_REFRESH_TOKEN or GOOGLE_APPLICATION_CREDENTIALS or GS_OAUTH2_PRIVATE_KEY+GS_OAUTH2_CLIENT_EMAIL configuration options and /home/qwerty/.boto not defined

如何获取GS_SECRET_ACCESS_KEY和GS_ACCESS_KEY_ID?

python-3.x google-cloud-storage gdal
1个回答
0
投票

gs_access_key_idgs_secret_access_key可以通过]生成>

1。导航到您的Google Cloud Storage控制台并单击Settings

2。在Settings页面上,导航至Interoperability选项卡。

3。在此页面上,您现在可以选择一个服务帐户,然后单击Create a new key以生成访问密钥和匹配的机密。

输出:

New service account HMAC key
[email protected]
Access key  
xxxxxxxxxxxxxxxxxxx
Secret  
xxxxxxxxxxxxxxxxxxx
Copy this key's secret if you'll need it in the future. Once you close this dialog, the secret can't be recovered.
© www.soinside.com 2019 - 2024. All rights reserved.