web-dev-qa-db-ja.com

git clone https / sslエラー

GitサーバーにSSL証明書とキーをインストールしました。しかし、mysysgitからhttps経由でクローンを作成しようとするとエラーが発生します。以前は、httpで正常に機能していました。失敗した場所を特定できません

$ git clone https://server.name/git/testing.git
Cloning into 'testing'...
* Couldn't find Host server.name in the _netrc file; using defaults
* About to connect() to server.name port 443 (#0)
*   Trying server.name...
* Adding handle: conn: 0x274fd60
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x274fd60) send_pipe: 1, recv_pipe: 0
* Connected to server.name(server.name) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:\Users\user1\AppData\Local\Programs\Git/bin/curl-ca-bundle.crt
  CApath: none
* SSL certificate problem: self signed certificate
* Closing connection 0
fatal: unable to access 'https://server.name/git/testing.git/': SSL certificate problem: self signed certificate
35
user2164525

git cloneの実行中にエラーが発生した場合、上記を次のように変更する必要があります。

git config --global http.sslVerify false
60
Pradeep S

場合によっては、証明書の検証を無効にする必要があります。

cd /path/to/repo
git config http.sslVerify false

(「 Git:自己署名証明書を無視する 」のように)

自己署名証明書によりGitリポジトリを複製できません 」に似た他のオプションは、その証明書をgitにインポートすることです。

つまり、ファイルの最後にコピーしました/path/to/git/bin/curl-ca-bundle.crt

私はお勧めしませんgit config --global http.sslVerify falseallローカルリポジトリの証明書検証を無効にします。

17
VonC

.gitconfigファイルを確認してください。

次の行が見つかったら、削除してください!

[http]
sslCAinfo = /bin/curl-ca-bundle.crt

それは私のために働いた。

3
madholic