Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error setting certificate verify locations - Github

Tags:

git

bash

github

ssl

I am having problem accessing github repository through Git Bash.

2 days ago I was able to push/pull the repositories. Then

1) I created an account on gitlab.com

2) I generated ssh key on my local pc following GitLab and SSH keys using git bash on windows

3) After this I did not create/pull/push any repository on gitlab.

Today I make few changes in a code (that is deployed on github), when I try to push that code I get following error

fatal: unable to access 'https://github.com/junaidbinsarfraz/repo.git/': error setting certificate verify locations:
  CAfile: E:/Softwares/Git/mingw64/libexec/ssl/certs/ca-bundle.crt
  CApath: none

There is no ssl folder in libexec

libexec folder

Also no file/folder changed in Git folder since Jan 2017

enter image description here

It seems like git-bash issue, not sure. Can anyone help ?

like image 333
Junaid Avatar asked Feb 01 '18 05:02

Junaid


2 Answers

In my case, on windows, It was not working after setting of name, e mail as well as certificates path for git config. following command run from command prompt fixed this issue.

git config --global http.sslcainfo "C:\Program Files\Git\usr\ssl\certs\ca-bundle.crt"

path of your ca-bundle.crt may vary in your case.

like image 175
Vishal Avatar answered Oct 15 '22 22:10

Vishal


Solution:

git config --global http.sslverify "false"

This command, Then your usual git clone "url" thing.

It can cause trouble in future to pull/push the secure repository. So disable at your risk.

like image 38
Gaurav Kumar Avatar answered Oct 15 '22 22:10

Gaurav Kumar