+ if repo["url"].startswith("oci://"):
+ repo["oci"] = True
+ if "ca_file" in kwargs:
+ try:
+ with open(kwargs["ca_file"], "r") as ca_cert:
+ repo["cacert"] = ca_cert.read()
+ repo.pop("ca_file")
+ except FileNotFoundError:
+ raise ClientException("CA file not found !")
+ except EOFError:
+ raise ClientException("Empty CA file !")
+ except PermissionError:
+ raise ClientException("Can not read CA file ! Insufficient permissions")
+ except Exception as e:
+ raise ClientException(f"Can not read the cert file ! Error: {e}")