From ac4a86d3125c07fbcdf5a0986423e3fdceca848f Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 3 Nov 2016 23:12:59 +0200 Subject: [PATCH] ssh: remove git utility --- setup.py | 1 - trezor_agent/__main__.py | 28 ---------------------------- 2 files changed, 29 deletions(-) diff --git a/setup.py b/setup.py index 1c94e6e..97c7b9f 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,6 @@ setup( ], entry_points={'console_scripts': [ 'trezor-agent = trezor_agent.__main__:run_agent', - 'trezor-git = trezor_agent.__main__:run_git', 'trezor-gpg-create = trezor_agent.gpg.__main__:main_create', 'trezor-gpg-agent = trezor_agent.gpg.__main__:main_agent', 'trezor-gpg-unlock = trezor_agent.gpg.__main__:auto_unlock', diff --git a/trezor_agent/__main__.py b/trezor_agent/__main__.py index ed90778..7fd0f37 100644 --- a/trezor_agent/__main__.py +++ b/trezor_agent/__main__.py @@ -164,31 +164,3 @@ def run_agent(client_factory=client.Client): pk['identity'] = identity return run_server(conn=conn, public_keys=public_keys, command=command, debug=args.debug, timeout=args.timeout) - - -@handle_connection_error -def run_git(client_factory=client.Client): - """Run git under ssh-agent using given hardware client factory.""" - args = create_git_parser().parse_args() - util.setup_logging(verbosity=args.verbose) - - with client_factory(curve=args.ecdsa_curve_name) as conn: - label = git_host(args.remote, ['pushurl', 'url']) - if not label: - log.error('Could not find "%s" SSH remote in .git/config', - args.remote) - return - - public_key = conn.get_public_key(label=label) - - if not args.test: - if args.command: - command = ['git'] + args.command - else: - sys.stdout.write(public_key) - return - else: - command = ['ssh', '-T', label] - - return run_server(conn=conn, public_key=public_key, command=command, - debug=args.debug, timeout=args.timeout)