Add option '--no-cert-checks' for 'upload' sub command.

This option allow to bypass verification ssl certification while
establishing connection with Gerrit to upload review.

Change-Id: If2e15f5a273c18a700eb5093ca8a4d5a4cbf80cd
This commit is contained in:
Łukasz Gardoń
2017-08-08 10:18:11 +02:00
parent c94d6eb902
commit bed59cec5e
3 changed files with 20 additions and 7 deletions

View File

@ -181,6 +181,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
# Never run upload hooks, but upload anyway (AKA bypass hooks).
# - no-verify=True, verify=True:
# Invalid
p.add_option('--no-cert-checks',
dest='validate_certs', action='store_false', default=True,
help='Disable verifying ssl certs (unsafe).')
p.add_option('--no-verify',
dest='bypass_hooks', action='store_true',
help='Do not run the upload hook.')
@ -389,7 +392,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
draft=opt.draft,
private=opt.private,
wip=opt.wip,
dest_branch=destination)
dest_branch=destination,
validate_certs=opt.validate_certs)
branch.uploaded = True
except UploadError as e:
branch.error = e