Skip to content

Commit

Permalink
add argument for an ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
fsinapi committed Sep 19, 2023
1 parent ae4a7ff commit d78336e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions push
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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():
Expand Down

0 comments on commit d78336e

Please sign in to comment.