Skip to content

Commit bbda0a6

Browse files
committed
Allow users to patsh to enters SSH keys in the CLI client
1 parent c2951f9 commit bbda0a6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

client/deis.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,9 +1300,14 @@ def parse_key(path):
13001300
print('Found the following SSH public keys:')
13011301
for i, key_ in enumerate(pubkeys_list):
13021302
print("{}) {} {}".format(i + 1, key_.name, key_.comment))
1303+
print("0) Enter path to pubfile (or use keys:add <key_path>) ")
13031304
inp = raw_input('Which would you like to use with Deis? ')
13041305
try:
1305-
selected_key = pubkeys_list[int(inp) - 1]
1306+
if int(inp) != 0:
1307+
selected_key = pubkeys_list[int(inp) - 1]
1308+
else:
1309+
selected_key_path = raw_input('Enter the path to the pubkey file: ')
1310+
selected_key = parse_key(os.path.expanduser(selected_key_path))
13061311
except:
13071312
print('Aborting')
13081313
return

0 commit comments

Comments
 (0)