0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

HTTPS の証明書を削除する

Posted at

HTTPS の証明書をなくしてあるツールの HTTPS の証明書確認プロセスが失敗する方法を検証する必要があったときのメモです
検証には git を使っています

環境

  • Linux(AmazonLinux2)
  • Windows(Windows Server2019)

Linux(AmazonLinux2)

SSL Certificate Location on UNIX/Linux

上記を参考に、以下を削除

rm  /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
rm  /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt

これで git が失敗する。

$git clone https://github.com/toshihirock/node-elb-log-parser.git
Cloning into 'node-elb-log-parser'...
fatal: unable to access 'https://github.com/toshihirock/node-elb-log-parser.git/': error setting certificate verify locations:  CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none

/etc/pki/tls/certs/ca-bundle.crt がないとのことで失敗。
OK。

git config --global http.sslVerify false コマンドを実行して SSL verify しないようにして再度実施。

$git config --global http.sslVerify false
$git clone https://github.com/toshihirock/node-elb-log-parser.git
Cloning into 'node-elb-log-parser'...
remote: Enumerating objects: 55, done.
remote: Total 55 (delta 0), reused 0 (delta 0), pack-reused 55
Receiving objects: 100% (55/55), 8.87 KiB | 4.43 MiB/s, done.
Resolving deltas: 100% (26/26), done.

この設定をすれば git clone は成功

Windows(Windows Server2019)

以下を参考に certmgr.msc の証明書をすべて削除したが、だめだった

Windows PCに追加した証明書の削除 (Windows Tips)

今回検証したいのが git だったため、git 配下にあるファイルを削除した。
より具体的には C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt をリネームした。

「Linux(AmazonLinux2)」と同じようにデフォルトでは失敗し、git config --global http.sslVerify false によってクローンできた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?