Skip to main content

error setting certificate verify locations when run git clone



I run into this error while using git clone.

D:\Projects>git clone https://github.com/jonmountjoy/facebook-template-ruby
Cloning into 'facebook-template-ruby'...
fatal: unable to access 'https://github.com/jonmountjoy/facebook-template-ruby/': error setting certificate verify locations:
  CAfile: C:/Program Files (x86)/Git/mingw32/ssl/certs/ca-bundle.crt
  CApath: none

How to fix


Run DOS Prompt as Administrator, and run git config --system http.sslcainfo "Path to ca-bundle.crt"

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>git config --system http.sslcainfo "C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt"

C:\WINDOWS\system32>

Then, I can run git clone successfully.

D:\Projects>git clone https://github.com/jonmountjoy/facebook-template-ruby
Cloning into 'facebook-template-ruby'...
remote: Counting objects: 177, done.
remote: Total 177 (delta 0), reused 0 (delta 0), pack-reused 177
Receiving objects: 100% (177/177), 138.36 KiB | 101.00 KiB/s, done.
Resolving deltas: 100% (68/68), done.
Checking connectivity... done.

Popular posts from this blog

Linux command: lastlog

lastlog command reports the most recent login of all users or of a given user. NAME lastlog - reports the most recent login of all users or of a given user SYNOPSIS lastlog [options] DESCRIPTION lastlog formats and prints the contents of the last login log /var/log/lastlog file. The login-name, port, and last login time will be printed. The default (no flags) causes lastlog entries to be printed, sorted by their order in /etc/passwd. OPTIONS The options which apply to the lastlog command are: -b, --before DAYS Print only lastlog records older than DAYS. -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -t, --time DAYS Print the lastlog records more recent than DAYS. -u, --user LOGIN|RANGE Print the ...

Powershell: Get-ChildItem

List, search/find files and directories with Get-ChildItem cmdlet.

Powershell: Test-NetConnection

PS C:\Users\tuyen> get-help Test-NetConnection NAME     Test-NetConnection SYNTAX     Test-NetConnection [[-ComputerName] <string>] [-TraceRoute] [-Hops <int>] [-InformationLevel {Quiet |     Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] [-CommonTCPPort] {HTTP | RDP | SMB | WINRM}     [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -Port <int> [-InformationLevel {Quiet | Detailed}]     [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -DiagnoseRouting [-ConstrainSourceAddress <string>]     [-ConstrainInterface <uint32>] [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>] ALIASES     TNC REMARKS     Get-Help cannot find the Help files fo...