あなたはgsutil
にecho
、パイプ、それを使用して入力を渡すことができます。
gsutil
コマンドがコマンドラインを受け入れない理由args - コマンドはシェルの履歴ファイルに保存されており、これらの秘密がコマンドライン引数として含まれていると秘密を漏らすことがあります。
したがって、次のコマンドはシェルの履歴に格納されます(あなたが他の方法でそれを防止しない限り)、あなたの秘密を含んでいる可能性があります。
$ echo -e "$ACCESS_KEY_ID\n$ACCESS_KEY_SECRET\n" | gsutil config -a
This command will configure HMAC credentials, but gsutil will use
OAuth2 credentials from the Cloud SDK by default. To make sure the
HMAC credentials are used, run: "gcloud config set
pass_credentials_to_gsutil false".
This command will create a boto config file at /Users/tuxdude/.boto
containing your credentials, based on your responses to the following
questions.
Boto config file "/Users/tuxdude/.boto" created. If you need to use a
proxy to access the Internet please see the instructions in that file.
What is your google access key ID? What is your google secret access key?
ありがとう – montatich