Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
This will create a public issue which anybody can view and comment on.
Please provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible please provide a summary of what steps or workarounds you have already tried, and any docs or articles you found (un)helpful.
Problem you have encountered:
When trying to run
gcloud cloud-shell ssh --ssh-key-file=~/.ssh/id_rsa
, the following error appears:What you expected to happen:
For the CLI to accept a string as the argument of that flag.
Steps to reproduce:
Create a key:
Use that key to connect to the cloud shell through the CLI:
Other information (workarounds you have tried, documentation consulted, etc):
Root cause:
On the file with the following code:
<gcloud path>/lib/googlecloudsdk/command_lib/cloud_shell/util.py
, that argument is parsed usingargparse
That
action
means that argument will only accept a boolean.Workaround:
Replace
store_true
bystore
:Proposed fix:
Change
store_true
forstore
in the code.Related community posts: