Quentin123345 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud sql instances set-root-password --password-file argument doesn't work or docs are not clear #450

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I have a file that contains just a single line password:

echo "a" > .passwd

I'm trying to set the password on a 2nd gen instance with:

gcloud sql instances set-root-password "$SQL_INSTANCE_NAME" --password-file 
.passwd

What is the expected output? What do you see instead?

It looks like it works correctly, but the password isn't accepted when I try to 
log in. If I use the --password argument instead and put my password directly 
in the command line argument it works as expected.

I just have a password as plaintext in the .passwd file. Is this supposed to be 
hashed somehow in the file? If so could you please make that more clear in the 
documentation?

What is the output of 'gcloud info'?

Google Cloud SDK [91.0.1]

Platform: [Mac OS X, x86_64]
Python Version: [2.7.10 (default, Aug 22 2015, 20:33:39)  [GCC 4.2.1 Compatible 
Apple LLVM 7.0.0 (clang-700.0.59.1)]]
Python Location: [/usr/bin/python]
Site Packages: [Disabled]

Installation Root: [/Users/jeff/sdks/google-cloud-sdk]
Installed Components:
  core: [2015.12.16]
  core-nix: [2015.11.24]
  gcloud: []
  gsutil-nix: [4.15]
  beta: [2015.10.08]
  gsutil: [4.16]
  bq: [2.0.18]
  bq-nix: [2.0.18]
System PATH: 
[/Users/jeff/sdks/google-cloud-sdk/bin:/opt/local/bin:/opt/local/sbin:/Users/jef
f/.nvm/versions/node/v4.1.1/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/U
sers/jeff/Projects/go/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/loc
al/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git
/bin:/usr/local/go/bin:/usr/local/mysql/bin:/Users/jeff/bin:/Developer/SDKs/Qt/5
.1.1/clang_64/bin:/opt/local/libexec/gnubin:/Users/jeff/sdks/android/platform-to
ols/:/usr/local/pear/bin:/Users/jeff/bin/restdown/bin:/Applications/MySQLWorkben
ch.app/Contents/MacOS]
Cloud SDK on PATH: [True]

Installation Properties: [/Users/jeff/sdks/google-cloud-sdk/properties]
User Config Directory: [/Users/jeff/.config/gcloud]
User Properties: [/Users/jeff/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [jeff@pndlm.com]
Project: [redacted-1120]

Current Properties:
  [core]
    project: [redacted-1120]
    account: [jeff@pndlm.com]
    disable_usage_reporting: [False]
  [compute]
    region: [us-central1]
    zone: [us-central1-c]

Logs Directory: [/Users/jeff/.config/gcloud/logs]
Last Log File: [/Users/jeff/.config/gcloud/logs/2015.12.29/14.41.22.535606.log]

Please provide any additional information below.

Original issue reported on code.google.com by jeffv...@gmail.com on 29 Dec 2015 at 10:47

GoogleCodeExporter commented 8 years ago

Original comment by z...@google.com on 30 Dec 2015 at 2:41