---
title: "GitHubからCloneをする際にSSLエラーが発生する | C#もぐもぐ"
description: "C#をもぐもぐしているblog"
url: "https://blog.223n.tech/posts/88/"
---

# GitHubからCloneをする際にSSLエラーが発生する

2018年7月23日

[Windows](https://blog.223n.tech/tags/Windows/) [トラブル対応](https://blog.223n.tech/tags/%E3%83%88%E3%83%A9%E3%83%96%E3%83%AB%E5%AF%BE%E5%BF%9C/) [Vagrant](https://blog.223n.tech/tags/Vagrant/) [Redmine](https://blog.223n.tech/tags/Redmine/)

[vagrant-redmine](https://github.com/histudy/vagrant-redmine) を使ってRedmineのテスト環境を構築しようとしていたのですが、
GitHubからRedmineのソースをCloneする際にエラーが発生しましたので、
その際の原因と対処法についての覚え書きです。

## 環境

- OS
  - `Windows 10 Home 10.0.17134 ビルド 17134`
- Vagrant
  - `Version 2.1.1`
- Vagrant Box histudy/stretch
  - `Version 9.5.0`
- ウイルス対策ソフト
  - `カスペルスキー インターネット セキュリティ 17.0.0.611 (m)`

### 実行エラーメッセージ

```bash
TASK [redmine : checkout Redmine] **********************************************
fatal: [default]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin https://github.com/redmine/redmine.git /opt/redmine", "msg": "Cloning into '/opt/redmine'...\nfatal: unable to access 'https://github.com/redmine/redmine.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none", "rc": 128, "stderr": "Cloning into '/opt/redmine'...\nfatal: unable to access 'https://github.com/redmine/redmine.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none\n", "stderr_lines": ["Cloning into '/opt/redmine'...", "fatal: unable to access 'https://github.com/redmine/redmine.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none"], "stdout": "", "stdout_lines": []}
```

### 原因

カスペルスキーの「ウェブ保護」が原因で、このエラーが発生していました。

現在のところ、「ウェブ保護」を「オフ」にすることで回避できます。

「`除外リストの管理に追加`」や「`信頼するWebサイトの設定に追加`」では、このエラーの回避はできません。

### 参考

- [\[GitHub\] SSL certificate problem: self signed certificate in certificate chain #646 / Microsoft/Git-Credential-Manager-for-Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/646)

[記事一覧に戻る](https://blog.223n.tech/posts/)
