![](/img/trans.png)
[英]StorageException: Anonymous caller does not have storage.objects.get access
[英]public GC storage access fails with Anonymous caller does not have storage.objects.get access
我正在嘗試按照此處所述訪問 Sentinel2 公共數據: https://cloud.google.com/storage/docs/public-datasets
該文件說:“相比之下,使用 Cloud Storage API 鏈接訪問公共數據不需要身份驗證。”
但是我收到以下錯誤:“com.google.cloud.storage.StorageException:匿名調用者沒有 storage.objects.get 訪問 Google Cloud Storage object。” 我正在使用 Java API:
存儲 = StorageOptions.getDefaultInstance().getService()
blob = storage.get(BlobId.of("bucketName", "objectName"))
有誰知道如何使用 Java API 下載這些文件? 謝謝!
object 需要公開可讀才能匿名訪問,該錯誤表明您嘗試閱讀的 object 不可公開閱讀。
Sentinel-2 存儲桶gcp-public-data-sentinel-2
不允許未經身份驗證的匿名列表(盡管您應該能夠在以任何帳戶登錄時瀏覽它)。 相反,存儲桶內的 object index.csv.gz
包含您可以訪問的內容列表。 單個對象可以匿名下載並具有相當長的文件路徑,例如:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.