73

I'm using SourceTree and try to clone from a general github repository, but I got this error:

fatal: unable to access 'https://github.com/mfitzp/15-minute-apps.git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version Completed with errors, see above.

How to solve it?

yu yang Jian
  • 6,680
  • 7
  • 55
  • 80
  • 4
    Having the same isue with TurtoiseGit since this morning too... – Rapster Feb 23 '18 at 10:39
  • 1
    Possible duplicate of [Git pull / push - unable to access HTTPS, SSL Routines seem to be down](https://stackoverflow.com/questions/48938019/git-pull-push-unable-to-access-https-ssl-routines-seem-to-be-down) – phd Feb 23 '18 at 13:00
  • This happened yesterday and is probably the background to your problem: https://githubengineering.com/crypto-removal-notice/ – user3042674 Feb 23 '18 at 12:41
  • updating git to latest version worked for me – user3731622 Jul 10 '19 at 21:26

7 Answers7

81

Check Tools > Options > Git in SourceTree, if you're using Use Embedded Git, you can see the git version is 1.9.5 which is old, latest version of git is 2.16.2.

So click Use System Git, if you install the newer version of git, after Use system Git it'll show newer version, then try to clone again it should work fine.

Also see another answer HERE.

enter image description here

yu yang Jian
  • 6,680
  • 7
  • 55
  • 80
28

I had the same problem and my fix was:

1.update git to the latest version

2.in command line check your tls version with command: git config http.sslVersion

3.if the version is tlsv1.0 than you have to update it to tlsv1.2 with command:

  • git config --global --unset http.sslVersion
  • git config --global --add http.sslVersion tlsv1.2

and than the error won't be present anymore

bsh
  • 447
  • 7
  • 16
  • This didn't quite work for me. Interestingly, when I followed the suggestion from Abed and updated git, it worked, but I got this warning: warning: unsupported ssl version tslv1.2: using default – manu3d Feb 24 '18 at 16:31
  • 1
    Step1 solved the problem for me `sudo apt-get install git` updates current `git` version – user13107 May 02 '18 at 09:01
20

You have to upgrade the git into the last version https://git-scm.com/downloads

Abed Alzain
  • 749
  • 4
  • 9
4

I had the same problem

First, update the git version from https://git-scm.com/downloads

You can install the 32 version and 64 version

Then try to pull the code from the remote repository.

If that doesn't work, run the following command to list all the git configurations

git config --global --list

Remove all the SSL configuration related settings. Remove only SSL configurations, like SSLVersion, etc. You can get the settings name from the above command result. The result format will be ConfigurationName=value. To remove configurations, run the following command.

git config --global --unset ConfigurationName

For example, if you want to remove the user.name configuration

git config --global --unset user.name

After deleting the SSL configurations, try to pull the code from the remote repository. This time the git will use the default SSL configuration values.

Shemeemsha R A
  • 1,416
  • 16
  • 22
4

First I have installed git version 2.16. When I type the git version in the terminal, the output is 1.9. So I uninstalled the old version. And check the git version again, it show me 2.16. The issue resolved, The git works.

Also I have done the following step early, But I don't think this is effective.

git config --global --unset http.sslVersion
git config --global --add http.sslVersion tlsv1.2
buddha
  • 795
  • 5
  • 11
4

I am using Mountain Lion (10.8.5) so I can't get a Git version higher than 2.3.5. The only thing that worked for me was to add an SSH key to my Github account, as explained here.

And then cloning with SSH. Either use SourceTree or just git clone git@github.com:[username]/[repository].git

Thomas
  • 1,491
  • 13
  • 23
3

Download new version, it will work like a charm -

https://git-scm.com/downloads