2012-02-13 3 views
3

다음 명령을 사용하여 github에 액세스하려고하면 확인에 실패하여 오류가 발생합니다. 나는이 문제 msysgit와컬을 통해 github에 액세스 할 수 없습니다.

C:\software\curl-7.23.1-win64-ssl-sspi>curl -i https://api.github.com 

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
More details here: http://curl.haxx.se/docs/sslcerts.html 

curl performs SSL certificate verification by default, using a "bundle" 
of Certificate Authority (CA) public keys (CA certs). If the default 
bundle file isn't adequate, you can specify an alternate file 
using the --cacert option. 
If this HTTPS server uses a certificate signed by a CA represented in 
the bundle, the certificate verification probably failed due to a 
problem with the certificate (it might be expired, or the name might 
not match the domain name in the URL). 
If you'd like to turn off curl's verification of the certificate, use the -k (or -- insecure) option. 

답변

2

과거 무엇을 어떻게해야합니까해야한다, 나는 언젠가 msysgit 올바르게 바로 CA의 인증서 파일을 데리러 다시 http.sslcainfo을 지정해야합니다.

git config --system http.sslcainfo \bin/curl-ca-bundle.crt 
(또한 presented here을하고 comments of the GitHub smart http page에)


이 작동하지 않는 경우 : 이 blog post에 의해 도시 된 바와 같이 git config --system http.sslcainfo /c/path/to/msysgit/bin/curl-ca-bundle.crt :

  • 시도가 전체 경로를 지정

    더 쉬운 해결 방법은 http.sslcainfo을의 절대 경로로 설정하는 것입니다 당신의 msysGit에 1,835,113,파일의 설치 bin 폴더는 :

    $ git config --global http.sslcainfo "/c/Program Files (x86)/Git/bin/curl-ca-bundle.crt" 
    

    나는 설정이 설치 미래 msysGit에 의해 덮어 쓰지 않습니다 있도록 --global 수준에서이 작업을 수행하기로 결정했습니다.

    • 다른 대안은 텍스트에 제안 --cacert 옵션을 (왜?), 사용하지 않을 경우 "HTTPS github access"
2

것은 -k에 대한 또 다른 제안을 사용에 자세히 설명되어 있습니다

>curl -i -k https://api.github.com 
HTTP/1.1 302 Found 
Server: nginx/1.0.4 
Date: Mon, 13 Feb 2012 09:14:24 GMT 
Content-Type: text/html;charset=utf-8 
Connection: keep-alive 
Status: 302 Found 
X-RateLimit-Limit: 5000 
ETag: "d41d8cd98f00b204e9800998ecf8427e" 
Location: http://developer.github.com 
X-RateLimit-Remaining: 4999 
Content-Length: 0 
+0

**주의 : **이 옵션은 SSL 인증서 유효성 검사를 비활성화합니다. --cacert를 선호합니다. –

+0

GitHUb 액세스에 cURL을 사용하면 SSL이 다소 중복됩니다. 리디렉션을 따르려면'-Lk' 플래그를 사용하십시오. – not2qubit

관련 문제