Contents

git clone fatal: Authentication failed; TLS certificate verification has been disabled

Solution 1

git - Github - TLS certificate verification has been disabled! on Windows - Stack Overflow from user16382594

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?

Solution 2

Work like a charm!

/blog/posts/2024/git-clone-fatal-authentication-failed/%E8%AA%8D%E8%AD%89%E7%AE%A1%E7%90%86%E5%93%A1.png
認證管理員
/blog/posts/2024/git-clone-fatal-authentication-failed/Windows%E8%AA%8D%E8%AD%89.png
Windows認證
/blog/posts/2024/git-clone-fatal-authentication-failed/%E6%96%B0%E5%A2%9E%E4%B8%80%E8%88%AC%E8%AA%8D%E8%AD%89.png
新增一般認證

  • IP/Address: git:http://<YourIP>
  • User Name: Your user name
  • PWD: Your Password
    /blog/posts/2024/git-clone-fatal-authentication-failed/Input.png
    Input

RCs

windows - git clone: Authentication failed for - Stack Overflow from RBT.

I faced same error on my development machine. I was trying to clone a repository. My machine had a newly installed Windows Server operating system. I was using Git bash as my Git client. When I ran Git's command to clone a repository it was not prompting me for user id and password which will be used for authentication. It was a new PC so no credentials were cached by Windows credential manager.

As a last resort, I manually added my credentials in credentials manager following below steps:

  1. Press Window + R to open Run prompt.
  2. Type Control and press OK
  3. Click User Accounts on Control Panel window.
  4. Click Credential Manager on User Accounts window.
  5. Click Windows Credentials on Credential Manager window.

Now, click Add a Windows credential in Windows Credentials section (refer yellow highlighting in screenshot below):

enter image description here

Now, enter the details as shown in the form below and click OK:

enter image description here

I had put the details as below:

Internet or network address: <gitRepoServerNameOrIPAddress>
User Name: <DomainName\MyUserName>
Password: <MyPassword>

Next time when you run any Git command targeting a repository set up on above address, this manually cached credential will be used.

Note:

  1. Close and relaunch any open Git bash, Powershell or command shell for the credential caching to take effect.
  2. From now on, whenever your domain account password changes then you'll have to update it on this screen as well. In corporate environment this happens regularly due to password rotation policy.

Update(12-Jun-2022): If adding a Windows credentials doesn't work for you then you can try Add a generic credential instead (refer screenshot below). Please note that while adding a generic credentials, Internet or network address of your TFS server is of the format:

git:https://YourTfsServerAddress

enter image description here