From 401555d25cf46cc884a2ac07a754664d4d482187 Mon Sep 17 00:00:00 2001 From: pavel-mikhalchuk Date: Sat, 28 Apr 2018 13:17:08 +0300 Subject: [PATCH] Proper handling of --no-validate-ssl argument Currently even if --no-validate-ssl is specified registry.py script fails with certificate verification error. This commit fixes this issue. Fixes: https://github.com/andrey-pohilko/registry-cli/issues/44 --- registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry.py b/registry.py index 4e3ea28..4dec4f1 100755 --- a/registry.py +++ b/registry.py @@ -141,7 +141,7 @@ def get_auth_schemes(r,path): if DEBUG: print("[debug][funcname]: get_auth_schemes()") - try_oauth = requests.head('{0}{1}'.format(r.hostname,path)) + try_oauth = requests.head('{0}{1}'.format(r.hostname,path), verify=not r.no_validate_ssl) if 'Www-Authenticate' in try_oauth.headers: oauth = www_authenticate.parse(try_oauth.headers['Www-Authenticate'])