更新: Google Cloud Shell在 Google Cloud Console 站点内提供了一个终端,无需手动创建虚拟机;它带有gsutil
预安装和预认证的 Google Cloud SDK。
先前的回答:如果您在gsutil
计算机上安装时遇到问题,请考虑以下方法:
f1-micro
使用 Google 提供的已gsutil
预安装的 Debian 映像启动一个实例。
使用 SSH 按钮通过浏览器界面连接到它(您也可以使用gcutil
或gcloud
命令,如果您已安装并可用这些命令)。
gcloud auth login --no-launch-browser
在实例内运行。它会给你一个用浏览器打开的 URL。打开它后,授予 OAuth 权限,它将显示一个代码。将该代码粘贴回您运行命令的命令行窗口,以便它获取身份验证令牌。
按照 Travis Hobrla 的建议运行gsutil mv
命令:
gsutil mv gs://bucket/source-object gs://bucket/dest-object
Once you're done with gsutil
, delete the instance by clicking on the Delete
button at the top of the VM instance detail page. Make sure that the box marked "Delete boot disk when instance is deleted" on the same VM instance page is checked, so that you don't leave an orphaned disk around, which you will be charged for.
You can also browse your persistent disks on the "Disks" tab right below the "VM instances" tab, and delete disks manually there, or make sure there aren't an orphaned disks in the future.
Given the current price of $0.013/hr for an f1-micro
instance, this should cost you less than a penny to do this, as you'll only be charged while the instance exists.