From d78336e1c944748dca967936efa6d26de2b3de11 Mon Sep 17 00:00:00 2001 From: Frank Sinapi Date: Tue, 19 Sep 2023 17:27:03 -0400 Subject: [PATCH] add argument for an ssh key --- push | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/push b/push index d911fb2c2..5a35197ca 100755 --- a/push +++ b/push @@ -122,6 +122,9 @@ def push(host, repo_path=None, build=True, restart=True): return -1 def _push_from_argparse(args): + if args.key: + _SSH_EXTRA_OPTS.append('-i') + _SSH_EXTRA_OPTS.append(args.key) return push(args.host, os.path.abspath(args.repo_path), not args.no_build, not args.no_restart) def _arg_parser(parent=None): @@ -148,6 +151,11 @@ def _arg_parser(parent=None): action='store_true', help='Skip restarting robot server' ) + parser.add_argument( + '--key', + type=str, + help='Private SSH key to use' + ) return parser def _main():