使用“gsutil iam set”时出现错误“Only bindings and etag fields may be set”

Getting error “Only bindings and etag fields may be set” on using “gsutil iam set”

$ gsutil iam get gs://.../Untitled.html > i.txt

$ gsutil iam set i.txt gs://.../Untitled.html

BadRequestException: 400 只能设置绑定和 etag 字段。

哪里错了?

这是一个已知问题,here这是他们处理解决方案的过程,您的代码实际上是正确的。