Bitbucket(Git)で リモートへの git コマンドが SSL connect error となる場合の対処法

1. curl の詳細エラーを表示させる(GIT_CURL_VERBOSE=1)

export GIT_CURL_VERBOSE=1
git ls-remote

このようなエラーが出ます

* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 18.205.93.1... * Connected to bitbucket.org (18.205.93.1) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -12286
* Expire cleared
* Closing connection #0

2. 現在の nss のバージョンとインストール可能なバージョンを表示させる

・現在の nss のバージョンを表示

yum list installed | grep nss
nss.x86_64                     3.16.1-7.el6_5                  @updates         

・インストール可能な nss のバージョンを表示

yum list | grep nss
nss.x86_64                                3.36.0-9.el6_10              updates  

3. nss のバージョンを上げる

yum update nss

これでエラーが出なくなります。

4. GIT_CURL_VERBOSE=1 を戻す

戻しておきましょう

unset GIT_CURL_VERBOSE

引用元 : https://goo.gl/2X6w3L

No.1443
02/13 09:37

edit