Fix SSL 'alert protocol version' issue while git clone remote repository

Summary

When encountering an "SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version" error during a git clone operation, the root cause is typically an outdated Git client. This error occurs because older Git versions, such as 1.9.5, do not support the modern TLS protocols required by remote repositories that have disabled weaker cryptographic algorithms for improved security. The recommended solution is to upgrade your Git installation to the latest version, which will support current security requirements. While disabling SSL verification with git config --global http.sslverify false can bypass the issue, this workaround is strongly discouraged due to the significant security risks it introduces.

Git provides ways to securely connect to remote repository and clone remote repository to local machine. This post will teach you how to fix the "SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version" issue while cloning a remote repository.

The issue would look like:

If this error occurs, it is most probably caused by out of date git version being used.To improve its security awareness, some weak cryptographic algorithms have been disabled and all git clients should upgrade to latest ones to accomodate to the new security requirements. In the above error case, you should first check what git version you are using to ensure that it's not too old. Open a command console or terminal and type git version.

In above screenshot, the git version is 1.9.5 which was released in 2015 and now deprecated and it is not supporting TLSv1.1. Try to upgrade the git version being used. 

Once the git is upgraded, try to clone the repository again and it should work.

In case you don't want to upgrade the git version and you still want it to work, you could try to config the git client to disable SSL check.

git config --global http.sslverify false

Note this way of workaround is not recommended as it beats the security checks which mean to ensure security of your environment.

GIT GIT CLONE GIT SECURITY

  RELATED

  COMMENTS

0

No comment for this article.