Benedikt S. Vogler
Benedikt S. Vogler

Reputation: 564

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.

Upvotes: 12

Views: 30259

Answers (5)

I was having this issues while cloning the repo, was struggling for few days on this issue in MAC osx environment. I have also recently changed my account password.

Sharing the solution that worked for me: (comment all the proxies and un comment the required one alone)

1) installed the SSH key as mentioned above.

2) open all the scripts having the proxy configuration in text pad and tiled them. 1).bash_profile, 2).gitconfig, 3) .npmrc 4).curlrc

3) comment all the proxy setting lines in all files by adding # in front

4)uncomment the one which is required - for me , i was doing a git clone from a secure server, hence i uncommented the [https] proxy line in .gitconfig file.

5) execute the clone command again, prompted for username and pass and clone was sucessful.

Upvotes: 0

korrekorre
korrekorre

Reputation: 1034

Solved this by updating to latest version of MacOS (from Sierra to High Sierra). I guess that something outdated got updated and it started working directly. Maybe someone gets here today and experiences the same thing.

Upvotes: 0

CodeWizard
CodeWizard

Reputation: 141986

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.

Upvotes: 11

RaviTezu
RaviTezu

Reputation: 3125

git clone https://github.com/torch/distro.git ~/torch --recursive

I have just tried cloning(using the above command) and it worked fine. I see all the submodules are hosted on github.com only. It might be some temporary issue with the SSL certificate at github.com's end.

Or else, you can try cloning it via SSH if that works for you.

Sub-modules cloned:

Submodule 'exe/env' (https://github.com/torch/env.git) registered for path 'exe/env'
Submodule 'exe/luajit-rocks' (https://github.com/torch/luajit-rocks.git) registered for path 'exe/luajit-rocks'
Submodule 'exe/qtlua' (https://github.com/torch/qtlua.git) registered for path 'exe/qtlua'
Submodule 'exe/trepl' (https://github.com/torch/trepl.git) registered for path 'exe/trepl'
Submodule 'extra/argcheck' (https://github.com/torch/argcheck.git) registered for path 'extra/argcheck'
Submodule 'extra/audio' (https://github.com/soumith/lua---audio.git) registered for path 'extra/audio'
Submodule 'extra/cudnn' (https://github.com/soumith/cudnn.torch.git) registered for path 'extra/cudnn'
Submodule 'extra/cunn' (https://github.com/torch/cunn.git) registered for path 'extra/cunn'
Submodule 'extra/cunnx' (https://github.com/nicholas-leonard/cunnx.git) registered for path 'extra/cunnx'
Submodule 'extra/cutorch' (https://github.com/torch/cutorch.git) registered for path 'extra/cutorch'
Submodule 'extra/fftw3' (https://github.com/soumith/fftw3-ffi.git) registered for path 'extra/fftw3'
Submodule 'extra/graph' (https://github.com/torch/graph) registered for path 'extra/graph'
Submodule 'extra/graphicsmagick' (https://github.com/clementfarabet/graphicsmagick.git) registered for path 'extra/graphicsmagick'
Submodule 'extra/lua-cjson' (https://github.com/mpx/lua-cjson) registered for path 'extra/lua-cjson'
Submodule 'extra/luaffifb' (https://github.com/facebook/luaffifb) registered for path 'extra/luaffifb'
Submodule 'extra/luafilesystem' (https://github.com/keplerproject/luafilesystem.git) registered for path 'extra/luafilesystem'
Submodule 'extra/nn' (https://github.com/torch/nn.git) registered for path 'extra/nn'
Submodule 'extra/nngraph' (https://github.com/torch/nngraph) registered for path 'extra/nngraph'
Submodule 'extra/nnx' (https://github.com/clementfarabet/lua---nnx.git) registered for path 'extra/nnx'
Submodule 'extra/penlight' (https://github.com/stevedonovan/Penlight.git) registered for path 'extra/penlight'
Submodule 'extra/sdl2' (https://github.com/torch/sdl2-ffi.git) registered for path 'extra/sdl2'
Submodule 'extra/signal' (https://github.com/soumith/torch-signal.git) registered for path 'extra/signal'
Submodule 'extra/threads' (https://github.com/torch/threads-ffi.git) registered for path 'extra/threads'
Submodule 'pkg/cwrap' (https://github.com/torch/cwrap.git) registered for path 'pkg/cwrap'
Submodule 'pkg/dok' (https://github.com/torch/dok.git) registered for path 'pkg/dok'
Submodule 'pkg/gnuplot' (https://github.com/torch/gnuplot.git) registered for path 'pkg/gnuplot'
Submodule 'pkg/image' (https://github.com/torch/image.git) registered for path 'pkg/image'
Submodule 'pkg/optim' (https://github.com/torch/optim.git) registered for path 'pkg/optim'
Submodule 'pkg/paths' (https://github.com/torch/paths.git) registered for path 'pkg/paths'
Submodule 'pkg/qttorch' (https://github.com/torch/qttorch.git) registered for path 'pkg/qttorch'
Submodule 'pkg/sundown' (https://github.com/torch/sundown-ffi.git) registered for path 'pkg/sundown'
Submodule 'pkg/sys' (https://github.com/torch/sys.git) registered for path 'pkg/sys'
Submodule 'pkg/torch' (https://github.com/torch/torch7.git) registered for path 'pkg/torch'
Submodule 'pkg/xlua' (https://github.com/torch/xlua.git) registered for path 'pkg/xlua'

Upvotes: 0

Related Questions