Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 403错误:使用python从google计算引擎上传到google云存储桶_Google Cloud Platform_Google Cloud Storage_Google Compute Engine - Fatal编程技术网

Google cloud platform 403错误:使用python从google计算引擎上传到google云存储桶

Google cloud platform 403错误:使用python从google计算引擎上传到google云存储桶,google-cloud-platform,google-cloud-storage,google-compute-engine,Google Cloud Platform,Google Cloud Storage,Google Compute Engine,我正试图将一个文件从google compute engine上的python脚本上传到google云存储,并得到下面的错误。该脚本运行良好,与谷歌云功能相同。去许可区的正确方法是什么 Adding new file 403 POST https://www.googleapis.com/upload/storage/v1/b/XXX/o?uploadType=multipart: ('Request failed with status code', 403, 'Expected on e o

我正试图将一个文件从google compute engine上的python脚本上传到google云存储,并得到下面的错误。该脚本运行良好,与谷歌云功能相同。去许可区的正确方法是什么

Adding new file
403 POST https://www.googleapis.com/upload/storage/v1/b/XXX/o?uploadType=multipart: ('Request failed with status code', 403, 'Expected on
e of', <HTTPStatus.OK: 200>)
添加新文件
403员额https://www.googleapis.com/upload/storage/v1/b/XXX/o?uploadType=multipart: (“请求失败,状态代码为”403“,应在
","的"e",

你可以看看这个

您可以按用户自定义服务帐户,这是按默认值自定义的帐户

但是,有些库执行诸如bucket.list或bucket.get之类的API调用,除存储对象读/写角色外,还必须授权存储管理员角色。或创建自定义角色