Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github - TLS certificate verification has been disabled! on Windows

Tags:

git

github

ssl

I am trying to clone a repository from Github but I couldn't clone the repo, its failed with TLS certificate verification has been disabled! error.

When I run the git clone command, it redirects to signin on Github its failed with TLS certificate and authentication failed for repo even though enter valid credential.

My Github account is enabled with two-factor authentication.

I have tried with disabling sslverifcation also git config --global http.sslVerify false

Github error message: enter image description here

System specification:

OS: Windows 10

Architecture: 64bit

Please help me on this. Thanks in advance.

like image 711
M.A.Murali Avatar asked Mar 09 '21 18:03

M.A.Murali


People also ask

How do I turn off certificate verification in git?

Prepend GIT_SSL_NO_VERIFY=true before every git command run to skip SSL verification. This is particularly useful if you haven't checked out the repository yet. Run git config http. sslVerify false to disable SSL verification if you're working with a checked out repository already.


2 Answers

This helped me:

1 Re-enable

git config --global http.sslVerify true

to get rid of the "TLS certificate verification has been disabled."

2 Create a personal access token on GitHub: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

3 When prompted to enter credentials, used my email as user and the personal access token as password

4 To delete a wrong credential follow Where is github authentication token stored on Windows?

like image 146
user16382594 Avatar answered Oct 08 '22 09:10

user16382594


You can allow git to talk to Windows's own certificate store, by using the following config:

git config --global http.sslBackend schannel

I don't know if this could help the OP, but I imagine it could help some people that end up on this question.

Here is my source: How do I configure Git to trust certificates from the Windows Certificate Store?

like image 38
Nacht Avatar answered Oct 08 '22 09:10

Nacht