如何将 gsutil 与多个帐户一起使用? [英] How can I use gsutil with multiple accounts?
本文介绍了如何将 gsutil 与多个帐户一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我经常通过至少两个帐户使用 Google Cloud Storage:personal@gmail.com 和 work@corp.com.我使用 gsutil config
为两个帐户创建 .boto
文件,我已将其重命名为 personal.boto
和 work.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屋!
查看全文