scalingexcellence / scrapybook

Scrapy Book Code
http://scrapybook.com/
475 stars 209 forks source link

git clone: error setting certificate verify locations #36

Closed lookfwd closed 7 years ago

lookfwd commented 7 years ago

Getting this error while cloning the book:

C:\Users\me> git clone https://github.com/scalingexcellence/scrapybook.git
Cloning into 'scrapybook'...
fatal: unable to access 'https://github.com/scalingexcellence/scrapybook.git/':
error setting certificate verify locations:
  CAfile: C:\Program Files\Git\mingw64/bin/curl-ca-bundle.crt
  CApath: none
lookfwd commented 7 years ago

A temporary fix is to use GIT_SSL_NO_VERIFY to disable ssl checking.

set GIT_SSL_NO_VERIFY=true 
git clone...
vetom commented 6 years ago

Installing Git again fix this error in my case.

JayaniSumudini commented 6 years ago

git config --global http.sslverify "false" This command resolve my problem

KA24956T commented 5 years ago

still i am getting same error

yellu123 commented 5 years ago

git config --global http.sslverify "false" This command resolve my problem

why it came what was the problem

yellu123 commented 5 years ago

why i need to use this command

guimmp92 commented 5 years ago

why i need to use this command

It disables verification for all certificates.

kokhapp commented 5 years ago

@lookfwd Thank you very much

lopesrodriguesn commented 5 years ago

Got the same issue, used SSH public key...more convenient for lazy dudes like me :) besides, cannot update Git client on my NAS in an easy way

NoBrainer commented 4 years ago

It's a better solution to get the ca-bundle.crt file and update the git config to use it with:

git config http.sslCAinfo "/path/to/ca-bundle.crt"
Utkarsh-Gangal commented 4 years ago

Awesome, this works

boiindo commented 4 years ago

@NoBrainer hey , I tried doing it . but it is not working . can you please help. still shows
CAfile: C:\Program Files\Git\mingw64/bin/curl-ca-bundle.crt it is a mac OS.

NoBrainer commented 4 years ago

@boiindo, it looks like you're mixing Windows and UNIX-based path syntax. You probably want something more like: git config http.sslCAinfo "/c/Program Files/Git/mingw64/bin/curl-ca-bundle.crt"

(Make sure you verify that the path is correct by doing something like: cd /c/Program Files/Git/mingw64/bin.)

boiindo commented 4 years ago

@NoBrainer thanx for replying. I did notice the mixing of 2 syntax. Donot understand how a windows path is present in macos. tried searching for curl-ca-bundle, couldn't find it. tried exporting certificates into a .pem file , but then get "fatal not in git directory" ( should i add the file in the bin) . when trying to change the path with git config , it says no access.

Kindly help. Can I download certificates from somewhere (don't know authentic places) and place it in the git directory ?

NoBrainer commented 4 years ago

@boiindo, you'll need to check inside of the directory where git is installed. For my Windows installation, it's this: Git/mingw64/ssl/certs/ca-bundle.crt. I'm not sure where it installs it for Mac, but I assume you can find it in the installation directory. (If you do not find this, you probably have an outdated version of git, so you should reinstall it first.)

Erasmus24 commented 3 years ago

Thanks guys, the following has helped me to fix the issue:

git config --global http.sslverify "false"

pranavdj9 commented 3 years ago

git config --global http.sslverify "false" This command resolve my problem

Thank you soo sooo much I got frustrated because it wasn't working , thank you!!!!!

NoBrainer commented 3 years ago

@Erasmus24 & @pranavdj9, by turning off http.sslverify, you are treating the symptom instead of solving the problem. You should fix the certificate issue instead of downgrading your security. This is only acceptable when debugging or working with a prototype.

pranavdj9 commented 3 years ago

Well... I really don’t know how to fix that, I tried searching the internet... but didn’t find anything relatable. If you know how to do it, then pls tell me I’ve just started using git bash, so I only know limited and basic commands

NoBrainer commented 3 years ago

@pranavdj9, you need to find where ca-bundle.crt is located within the Git installation. If you can't find it, you probably have to update/reinstall Git. Once you find the file, you can run: git config http.sslCAinfo "/path/to/ca-bundle.crt"

pranavdj9 commented 3 years ago

Thanks so much I will definitely try it

vershiy commented 3 years ago

Thanks Steve I really appreciate

On Sun, Oct 25, 2020 at 9:07 PM Steven Penny notifications@github.com wrote:

I had this problem as well. My issue was this file:

/usr/ssl/certs/ca-bundle.crt

if by default just an empty file. So even if it exists, youll still get the error as it doesnt contain any certificates. You can generate them like this:

p11-kit extract --overwrite --format pem-bundle /usr/ssl/certs/ca-bundle.crt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/scalingexcellence/scrapybook/issues/36#issuecomment-716262796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQM7RKSSX5U6OJUI2DDB4DDSMTKXLANCNFSM4DRWJ7IA .

BevilaquaBruno commented 3 years ago

I was getting the same error, and i resolved it with this steps:

  1. Unnistall Git from your PC, and remove the folder remained(Git/etc).
  2. Access your path variables and remove the git from all the users and the general path.
  3. Install git again running as admin.
RachaelMuthoni commented 3 years ago

While installing git I enabled the git credential manager. Weeell, I clicked next next next finish without customizing anything. But when am pushing my code to my github account and am about to complete authentication by authorizing the git credential manager, am unable to because where am supposed to click has been disabled. image

RachaelMuthoni commented 3 years ago

Helloooo, I got a solution to my problem an am happy. I was using Microsoft edge a my default browser and it had no certificates for verification. That is why the button "authorize git credential manager" was disabled. Thanks to me😊

SereneFeng commented 3 years ago

One possible reason you're getting that error is because this path C:\Program Files\Git\mingw64/bin/curl-ca-bundle.crt (which is the CA file path shown in the error message) is NOT where your curl-ca-bundle.crt is located. I went into program files (file explorer) and found that my CA file was located at D:\ProgramFiles(D)\Git\mingw64\ssl\certs\ca-bundle.crt. I had installed Git on a different location than they expected.

To tell Git to run on the correct path, run: git config --system http.sslcainfo "YOUR PATH"

example: git config --system http.sslcainfo "D:\ProgramFiles(D)\Git\mingw64\ssl\certs\ca-bundle.crt"

After that, go ahead and run the git clone / git push / ect. stuff! Looks like the post author's next step is running git clone https://github.com/scalingexcellence/scrapybook.git

samgreguc commented 3 years ago

@pranavdj9, you need to find where ca-bundle.crt is located within the Git installation. If you can't find it, you probably have to update/reinstall Git. Once you find the file, you can run: git config http.sslCAinfo "/path/to/ca-bundle.crt"

i know this reply is late but i am having same issue on my windows laptop. can you please guide me through?

samgreguc commented 3 years ago

@pranavdj9 here is the reply when I tried the git clone

PS C:\Users\Samuel Greg> git clone https://github.com/flutter/flutter.git -b stable

Cloning into 'flutter'... fatal: unable to access 'https://github.com/flutter/flutter.git/': error setting certificate verify locations: CAfile: C:/Path/To/CertBundle/ca-bundle.crt CApath: none PS C:\Users\Samuel Greg>

alejandro0619 commented 2 years ago

git config --global http.sslverify "false"

This solved my error, thanks so much

irenelopezruiz commented 2 years ago

Thanks guys, the following has helped me to fix the issue:

git config --global http.sslverify "false"

When I use this, it says: error: could not lock config file C:/Users/Irene/.gitconfig: Permission denied what can i solve it?

Wakogemeda commented 2 years ago

git config --global http.sslverify "false" This command solve problem

alejandro0619 commented 2 years ago

Thanks guys, the following has helped me to fix the issue: git config --global http.sslverify "false"

When I use this, it says: error: could not lock config file C:/Users/Irene/.gitconfig: Permission denied what can i solve it?

Did you solved it? You can run it using administrator privileges and see if it works. By the way, this stackoverflow threat have many fixes: https://stackoverflow.com/questions/55327408/how-to-fix-git-for-windows-error-could-not-lock-config-file-c-file-path-to-g

amjadjamali06 commented 2 years ago

git config --global http.sslverify "false" This command resolve my problem

My Problem is solved using this command.

Thanks JayaniSumudini 👍🏻

Philippe-OPC commented 2 years ago

It's a better solution to get the ca-bundle.crt file and update the git config to use it with:

git config http.sslCAinfo "/path/to/ca-bundle.crt"

This is the line we all need, it works like a charm for me, but be sure to have only that line and not http.sslCApath and use --system to apply system-wide Here is my command : sudo git config --system http.sslCAinfo /usr/local/share/ca-certificates/zscaler.crt

Here is my file :

[http]
        sslCAinfo = /usr/local/share/ca-certificates/zscaler.crt

Disabling ssl was not an option for me

Remigiusz-Gabryel commented 2 years ago

Like other suggested. git config --system http.sslCAinfo "C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt" - worked, just remember to run this command in Terminal opened with administrator privilege... I didn't, I suffered for 20 minutes.

Coeliman commented 1 year ago

Did the command that supposedly fixes it, went through successfully. Yet I am still getting the same error, I am using portablegit and do not have administrative permissions on this PC. Any ideas?

sethWines commented 1 year ago

I had this issue as well. Hopefully I'm not repeating an answer but I figured I'd document a cause. I had renamed the "User" folder where git was installed. I had already updated my $PATH variables but I didn't update any git configs.

Old Directory T:**oldname\Git\mingw64\ssl\certs\ca-bundle.crt New Directory T:\newname**\Git\mingw64\ssl\certs\ca-bundle.crt

So I just used this like many others posted above: git config --global http.sslCAInfo T:\newname\Git\mingw64\ssl\certs\ca-bundle.crt

Coeliman commented 1 year ago

For me it was another issue. Had a friend much more experienced with git then me help fix it. They fixed it by running git config --global http.sslbackend schannel

They found it off of here: https://github.com/microsoft/Git-Credential-Manager-for-Windows/issues/646

Commod0re commented 1 year ago

in my case this was caused by my ca-bundle.crt was owned by the wrong user and not readable by others, chmod a+r ca-bundle.crt fixed it

marwanm-dev commented 1 year ago

For me it was another issue. Had a friend much more experienced with git then me help fix it. They fixed it by running git config --global http.sslbackend schannel

They found it off of here: microsoft/Git-Credential-Manager-for-Windows#646

Solved it for me

dennisokafor commented 1 year ago

For me it was another issue. Had a friend much more experienced with git then me help fix it. They fixed it by running git config --global http.sslbackend schannel They found it off of here: microsoft/Git-Credential-Manager-for-Windows#646

Solved it for me

For me it was another issue. Had a friend much more experienced with git then me help fix it. They fixed it by running git config --global http.sslbackend schannel They found it off of here: microsoft/Git-Credential-Manager-for-Windows#646

Solved it for me

This worked for me, Thanks !

sajid365-sr commented 1 year ago

git config --global http.sslverify "false" This command resolve my problem

Thanks...It works for me

mrkhadus commented 1 year ago

It just happens if we are using the old version of the git, updating the git should solve this issue. cmd: "git update-git-for-windows"

ALNAshef commented 1 year ago

I got the same problem, I re-installed git and it works.

umeshbedi commented 9 months ago

ca-bundle.crt

best method

NoCode4real commented 4 months ago

git config --global http.sslverify "false" This command resolve my problem

Thank you so much solved the problem 👍

smtmRadu commented 4 months ago

git config --global http.sslverify "false"

worked for me

motazreda commented 3 weeks ago

guys the path just changed git config --global http.sslcainfo "C:\Program Files\Git\mingw64\etc\ssl\certs\ca-bundle.crt"

ssl folder is now inside etc folder.