Erros de certificado SSL para pip e maven no OS / X Sierra

0

Problemas com o certificado SSL estão ocorrendo em pelo menos dois tipos de processos não relacionados: criação de aplicativos para python/pip e scala/java app ( spark ) usando maven .

Isso está ocorrendo em um novo Macbook pro com Sierra.

Aqui está o primeiro: pip :

    $pip install numpy
    Collecting numpy
      Could not fetch URL https://pypi.python.org/simple/numpy/: 
There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) - skipping
      Could not find a version that satisfies the requirement numpy (from versions: )
    No matching distribution found for numpy

Eu não encontrei esse problema em outros sistemas / máquinas. Segui a sugestão aqui: link . Mas adicionando o --cert path_to_cert não teve efeito

Segundo exemplo: eu fiz um git clone de Spark e estava tentando compilá-lo como mostrado:

$./build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.0 -DskipTests clean package

Falhou imediatamente com erros de certificado:

Using 'mvn' from path: /usr/local/bin/mvn
[INFO] Scanning for projects...
Downloading: https://repo1.maven.org/maven2/org/apache/apache/14/apache-14.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.3.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 22, column 11
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.apache.spark:spark-parent_2.11:2.3.0-SNAPSHOT (/shared/spark/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.apache.spark:spark-parent_2.11:2.3.0-SNAPSHOT: Could not transfer artifact org.apache:apache:pom:14 from/to central (https://repo1.maven.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 22, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Eu observei questões aparentemente semelhantes, mas nenhuma se encaixou em minhas circunstâncias específicas: por exemplo, parece haver um certificado válido no JRE / JDK:

$ll /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/security/cacerts
-rw-rw-r--  1 root  wheel  113484 Mar 15 01:51 /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/security/cacerts
    
por javadba 09.06.2017 / 01:02

1 resposta

0

KASPERSKY ENDPOINT SECURITY

Desativando-o temporariamente - enquanto instala pip / building via maven - o problema desaparece.

    
por 09.06.2017 / 16:30