Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

git and "Server aborted the SSL handshake" errors

Often when I want to push to my private repo I get a "Server aborted the SSL handshake" error. After several tries it often suddenly works. I was yet not able to find a solution on the internet.

If this weren't annoying enough today I wanted to install torch via git clone https://github.com/torch/distro.git ~/torch --recursive

It fails every time at the public cutorch.git

fatal: unable to access 'https://github.com/torch/cutorch.git/': Server aborted the SSL handshake fatal: clone of 'https://github.com/torch/cutorch.git' into submodule path 'extra/cutorch' failed

However when I execute this line by myself it works fine:

git clone https://github.com/torch/cutorch.git/ extra/cutorch

Now I have to restart the install process which fails because the folder already exists. So no torch for me unless this is fixed?

I have the latest version of git(2.8.1) installed and use Mac OS 10.11.4.

How do I fix this annoying SSL handshake error?

Update: It may be caused by my ISP. I have had phases where I had problems with HTTPS and iTunes Store connections as well.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Often when I want to push to my private repo I get a "Server aborted the SSL handshake" error. After several tries it often suddenly works. I was yet not able to find a solution on the internet :(

It might be a problem of the different ssl version you are using.

In order to fix it generate a new ssl (RSA) certificate, and update your GitHub account with this new certificate.

Here is how to set it up:

  • Generate a new ssh key. *Set the -t to rsa in order to avoid future connection problems.

    ssh-keygen -t rsa
    
  • Once you have your generated in your %HOME%/.ssh directory ( windows: Users/<your user>.ssh), open it and copy the content of the <keyname>.pub


How to set up ssh key under your GitHub account?

  • Login to GitHub account
  • Click on the rancher on the top right (Settings)
    enter image description here
  • Click on the SSH keys and GPG Keys
    enter image description here
  • Click on the New SSH key
    enter image description here
  • Paste your key and save

Note

After the first set up open terminal and run a git fetch so the key will be tested and added to your known hosts file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...