mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
add ignore ssl
This commit is contained in:
parent
ebda8363f2
commit
77fa363992
@ -2,7 +2,7 @@
|
|||||||
import json
|
import json
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import os
|
import os
|
||||||
import urllib2
|
import urllib2, ssl
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
@ -52,7 +52,7 @@ class Admiral:
|
|||||||
request.add_header('Content-Length', data_len)
|
request.add_header('Content-Length', data_len)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
urllib2.urlopen(request)
|
urllib2.urlopen(request, context=ssl._create_unverified_context())
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if not retry:
|
if not retry:
|
||||||
logger.error("failed to import project: %s, admiral_endpoint: %s, error: %s " % (project.project_name, self.admiral_url, str(e)))
|
logger.error("failed to import project: %s, admiral_endpoint: %s, error: %s " % (project.project_name, self.admiral_url, str(e)))
|
||||||
|
Loading…
Reference in New Issue
Block a user