fix(cme): check if proto is ssh before checking for keyfile arg

main
Marshall Hallenbeck 2023-05-01 11:52:10 -04:00 committed by GitHub
parent 05ed2b8746
commit f25d83a510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -97,11 +97,12 @@ def main():
except Exception as e:
cme_logger.error(f"Error opening le dank meme: {e}")
sys.exit(1)
if args.key_file:
if not args.password:
cme_logger.fail(f"Password is required, even if a key file is used - if no passphrase for key, use `-p ''`")
sys.exit(1)
if args.protocol == "ssh":
if args.key_file:
if not args.password:
cme_logger.fail(f"Password is required, even if a key file is used - if no passphrase for key, use `-p ''`")
sys.exit(1)
if args.use_kcache and not os.environ.get("KRB5CCNAME"):
cme_logger.error("KRB5CCNAME environment variable is not set")