git clone 시 server certificate verification failed 오류 해결

ChangSol·2024년 3월 14일

git clone 시 아래와 같이 오류가 발생하는 경우가 있다.

$ git clone https://gitlab-url/{repo}.git
Cloning into '{repo}' ...
fatal: unable to access 'https://gitlab-url/{repo}.git/': server
certificate verification failed. CAfile: none CRLfile:none

위 오류는 SSL 인증서가 올바르지 않거나 또는 비공식적으로 서명, OS의 CA(Certificate authority) 목록에 없는 기관/회사에서 서명한 것일때 나는 오류이다.

해결방법은 아래와 같다.

  1. 1회성
export GIT_SSL_NO_VERIFY=1
  1. 전역설정
git config --global http.sslverify false

위 설정 후 clone 시 문제가 해결된다.

profile
Back-End Developer

0개의 댓글