Sourcetreeでは、SSL証明書の検証確認をしないオプションも利用できます。このオプションを利用すると、自組織のCA証明書が配置されていなくても
リポジトリの操作をすることができます。設定手順についてはこちらの記事を参照してください。
Sourcetreeで自組織のSSL証明書を利用する場合の設定手順を紹介します。
自組織のSSL証明書のコードサイニング元のCAの証明書をアクセスするPCに配置します。
Webブラウザなどでは、Windowsの証明書ストアに登録する方式で問題ないですが、Gitのアクセスの場合はGitの参照する証明書を指定する必要があります。
ファイルの位置は下記のパスになります。
C:\Users\Penta\AppData\Local\Atlassian\SourceTree\git_local\mingw32\ssl\certs
certsフォルダに、自組織のCAの証明書を配置します。
ca-bundle.crt
ca-bundle.trust.crt
ファイルがデフォルトで配置されているファイルです。今回、自組織のCA証明書ファイル iPentec-CA-ACA.cer
ファイルを追加で配置しています。
続いてgitconfigを修正して、証明書を参照する設定を追加します。
ファイルの位置は下記のパスになります。
C:\Users\Penta\AppData\Local\Atlassian\SourceTree\git_local\etc\gitconfig
gitconfigファイルに下記の設定を追記します。
[http "(接続するgitホスト)"]
sslCAinfo = (参照するSSL証明書のパス)
[core]
symlinks = false
autocrlf = true
fscache = true
[color]
diff = auto
status = auto
branch = auto
interactive = true
[pack]
packSizeLimit = 2g
[help]
format = html
[diff "astextplain"]
textconv = astextplain
[rebase]
autosquash = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[credential]
helper = helper-selector
[core]
symlinks = false
autocrlf = true
fscache = true
[color]
diff = auto
status = auto
branch = auto
interactive = true
[pack]
packSizeLimit = 2g
[help]
format = html
[http "https://kobako"]
sslCAinfo = /ssl/certs/iPentec-CA-ACA.cer
[diff "astextplain"]
textconv = astextplain
[rebase]
autosquash = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[credential]
helper = helper-selector