# Git SSL 憑證問題

# 問題

在 GitLab 或是其他自建 GitLab Server 中,憑證有可能是自簽憑證或是有認證上的問題,這篇文章就是設定讓 git 在 clone 的時候,忽略憑證驗證。

# 方法一、全域忽略驗證 (危險性高)

git config --global http.sslVerify false

# 方法二、單次 clone 忽略驗證

GIT_SSL_NO_VERIFY=true git clone https://localhost/test/test.git
git -c http.sslVerify=false clone https://localhost/test/test.git

# 方法三、單一 Repository 忽略驗證

在 Repository 目錄下

git config http.sslVerify false