diff options
author | Łukasz Gardoń <garjack555@gmail.com> | 2017-08-08 10:18:11 +0200 |
---|---|---|
committer | Łukasz Gardoń <garjack555@gmail.com> | 2017-08-23 14:06:14 +0200 |
commit | bed59cec5e5a9a5668cf2c7df3a24545b1e76c09 (patch) | |
tree | f7569ff48632187517e5df8dd2d3cb5850691593 /subcmds/upload.py | |
parent | c94d6eb90233421b431adbd5a01b7ec24729a285 (diff) | |
download | git-repo-bed59cec5e5a9a5668cf2c7df3a24545b1e76c09.tar.gz |
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
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r-- | subcmds/upload.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 61b18bc2..60feff7a 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -181,6 +181,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
181 | # Never run upload hooks, but upload anyway (AKA bypass hooks). | 181 | # Never run upload hooks, but upload anyway (AKA bypass hooks). |
182 | # - no-verify=True, verify=True: | 182 | # - no-verify=True, verify=True: |
183 | # Invalid | 183 | # Invalid |
184 | p.add_option('--no-cert-checks', | ||
185 | dest='validate_certs', action='store_false', default=True, | ||
186 | help='Disable verifying ssl certs (unsafe).') | ||
184 | p.add_option('--no-verify', | 187 | p.add_option('--no-verify', |
185 | dest='bypass_hooks', action='store_true', | 188 | dest='bypass_hooks', action='store_true', |
186 | help='Do not run the upload hook.') | 189 | help='Do not run the upload hook.') |
@@ -389,7 +392,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
389 | draft=opt.draft, | 392 | draft=opt.draft, |
390 | private=opt.private, | 393 | private=opt.private, |
391 | wip=opt.wip, | 394 | wip=opt.wip, |
392 | dest_branch=destination) | 395 | dest_branch=destination, |
396 | validate_certs=opt.validate_certs) | ||
397 | |||
393 | branch.uploaded = True | 398 | branch.uploaded = True |
394 | except UploadError as e: | 399 | except UploadError as e: |
395 | branch.error = e | 400 | branch.error = e |