如何将gsutil用于多个帐户? [英] How can I use gsutil with multiple accounts?

查看:76
本文介绍了如何将gsutil用于多个帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常使用至少两个帐户使用Google Cloud Storage:personal@gmail.com和work@corp.com.我使用gsutil config为两个帐户创建了.boto文件,我将其重命名为personal.botowork.boto.

I frequently use Google Cloud Storage with at least two accounts: personal@gmail.com and work@corp.com. I used gsutil config to create .boto files for both accounts, which I've renamed to personal.boto and work.boto.

每当我需要在这些帐户之间切换时,都必须记住键入cp personal.boto ~/.boto,这很烦人.有更好的方法吗?

It is tiring to have to remember to type cp personal.boto ~/.boto whenever I need to switch between these accounts. Is there a better way?

推荐答案

最简单的方法如下:

$ BOTO_CONFIG=/path/to/personal.boto gsutil cp #...

有关此主题的更多详细变化,请参见此主题.

For more detailed variations on this theme see this thread.

这篇关于如何将gsutil用于多个帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆