컬이 bit.ly에 연결할 수 없는 이유는 무엇입니까?

컬이 bit.ly에 연결할 수 없는 이유는 무엇입니까?

지침과 샘플 코드 및 예제에 따라 Hyperledger Fabric을 설치하려고 합니다.그들의 페이지에서. 그러나 다음 명령을 실행하려고 하면:

curl -sSL https://bit.ly/2ysbOFE | bash -s

다음 오류가 발생합니다.

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

약간의 디버깅 후에 문제는 이름 909be051.0/etc/ssl/certs/. 찾은 조언을 이해하려고 노력 중입니다.여기, 그러나 나는 이것을 언급하지 않았습니다 rootcert.pem.

그런 다음 컬을 제거하고 다시 설치해 보았습니다. 그건 소용없어요. 를 실행하여 인증서 업데이트를 시도 update-ca-certificates하고 c_rehash. 그것들은 아무 소용이 없습니다.

그러다가 이걸 발견했어요답변. 이 명령을 확인했습니다(예:여기) 및 관련 콘텐츠 읽기여기을 사용하여 아래와 같이 bit.ly의 SSL 인증서를 얻으려고 시도합니다.

openssl s_client -showcerts -servername bit.ly -connect bit.ly:443 > cacert.pem

그런 다음 인증서를 인증서 디렉터리에 복사하고 and를 /etc/ssl/certs실행 하고 컬 명령을 다시 시도했지만 다시 작동하지 않았습니다. 호출할 때 디렉토리를 지정하지 않았고 환경 변수가 비어 있었기 때문에 프로세스가 올바르게 실행되지 않았을 수도 있습니다. 어쨌든 이 인증서를 다음과 같은 명령에서 직접 사용했습니다.update-ca-certificatesc_rehashc_rehashSSL_CERT_DIRcurl

curl -vsSL https://bit.ly/2ysbOFE --cacert ./cacert.pem | bash -s

그리고 얻었습니다

...

* Connection #0 to host bit.ly left intact
* Issue another request to this URL: 
'https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh'
*   Trying 185.199.109.133:443...
* Connected to raw.githubusercontent.com (185.199.109.133) port 443 (#1)
* ALPN, offering http/1.1
*  CAfile: ./cacert-bitly.pem

...

* TLSv1.3 (OUT), TLS alert, unknown CA (560):
} [2 bytes data]
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 1
curl: (60) SSL certificate problem: unable to get local issuer certificate

이는 내가 제공한 인증서가 에 연결하는 데 적합한 것으로 보이지만 bit.ly이제 컬이 두 번째 도메인에 대한 인증서가 포함되지 않은 raw.githubusercontent.com내가 제공한 동일한 파일을 사용하여 연결을 시도하고 있음을 보여줍니다. .pem그래서 이전 명령으로 얻은 인증서를 재사용했습니다 raw.githubusercontent.com.

openssl s_client -showcerts -servername raw.githubusercontent.com -connect raw.githubusercontent.com:443 > cacert-githubusercontent.pem

두 번째 인증서를 인증서 디렉터리에 다시 복사하고 and를 /etc/ssl/certs실행한 다음 컬 명령을 다시 시도했지만 다시 작동하지 않았습니다(다시 말하지만, 업데이트를 잘못된 방식으로 수행했을 수도 있습니다). 그런 다음 두 번째 인증서를 첫 번째 인증서에 추가하여 두 인증서를 모두 다음과 같이 하나의 파일에서 컬 명령에 사용할 수 있습니다.update-ca-certificatesc_rehash

cat cacert-githubusercontent.pem >> cacert.pem

마지막으로 다음을 실행합니다.

curl -vsSL https://bit.ly/2ysbOFE --cacert ./cacert.pem | bash -s

효과가 있었습니다.

내 질문은 다음과 같습니다

  • bit.ly 인증서가 분실된 이유는 무엇인가요?
  • 컬이 어떤 인증서를 사용할지 자체적으로 결정할 수 없는 이유는 무엇입니까?
  • 컬이 이 파일을 요청하는 이유는 무엇입니까 909be051.0?
  • 내가 하는 방식은 안전한가요?
  • 이 일을 더 쉽게 할 수 있을까요?

미리 감사드립니다!

추신: 저는 이 모든 작업을 VMWare 가상 머신에서 실행되는 Ubuntu 18.04.6에서 수행했습니다.

관련 정보