0

Googleストレージの資格情報をDockerfileに追加しようとしているため、新しいPodを作成するたびに、またはKubernetesで別のものが作成される必要がありません。 そうではなく、コマンドにCloud SDKのコマンドgsutil config -a

gsutil config -a 

を実行し、手動で(アクセスキー)と(シークレット)を挿入するよりも、この

gsutil config -a (Access Key) (Secret) 

のように、このコマンドを置くためにそこに方法があります。

おかげ

答えて

0

あなたはgsutilecho、パイプ、それを使用して入力を渡すことができます。

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? 
+0

ありがとう – montatich

関連する問題