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