Firebase 在MacOS上运行gsutil

Firebase 在MacOS上运行gsutil,firebase,google-cloud-storage,firebase-storage,gsutil,Firebase,Google Cloud Storage,Firebase Storage,Gsutil,我正试图使用gsutil,根据谷歌使用最新版本MacOS的说明,在我的firebase存储桶上设置CORS。我不确定是否正确安装了gsutil,或者是否存在其他我不了解的问题,但当我运行gsutil cors set cors.json gs://docavea2.appspot.com时,我收到以下错误: Setting CORS on gs://docavea2.appspot.com/... Traceback (most recent call last): File "<st

我正试图使用gsutil,根据谷歌使用最新版本MacOS的说明,在我的firebase存储桶上设置CORS。我不确定是否正确安装了gsutil,或者是否存在其他我不了解的问题,但当我运行
gsutil cors set cors.json gs://docavea2.appspot.com
时,我收到以下错误:

Setting CORS on gs://docavea2.appspot.com/...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/jr/google-cloud-sdk/platform/gsutil/gslib/__init__.py", line 119, in <module>
    CHECKSUM_FILE, CHECKSUM = _GetFileContents('CHECKSUM')
  File "/Users/jr/google-cloud-sdk/platform/gsutil/gslib/__init__.py", line 107, in _GetFileContents
    content = pkgutil.get_data('gslib', filename)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 591, in get_data
    return loader.get_data(resource_name)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 255, in get_data
    return open(pathname, "rb").read()
IOError: [Errno 2] No such file or directory: '/Users/jr/google-cloud-sdk/platform/gsutil/gslib/CHECKSUM'

我在stackoverflow上看到有人说,如果他把[{放在同一行上,这对他是有效的,但对我来说没有什么区别。

我发现校验和安装在 /Users/jr/googlecloudsdk/platform/gsutil

在我把它复制到
/Users/jr/googlecloudsdk/platform/gsutil/gslib/it可以工作。

我发现CHECKSUM安装在 /Users/jr/googlecloudsdk/platform/gsutil

在我把它复制到
/Users/jr/google cloud sdk/platform/gsutil/gslib/it起作用。

这是一个pkgutil问题,不是您的CORS文件的问题。您的系统上是否确实存在/Users/jr/google cloud sdk/platform/gsutil/gslib/CHECKSUM?这是pkgutil问题,不是CORS文件的问题。是否/Users/jr/google cloud sdk/platform/gsutil/gslib/CHECKSUM确实存在在你的系统上存在吗?对我也有效。:)对我也有效。:)
[
    {
        "origin": ["*"],
        "method": ["GET"],
        "maxAgeSeconds": 3600
    }
]