git和“服务器中止了SSL握手”错误 [英] git and "Server aborted the SSL handshake" errors

查看:181
本文介绍了git和“服务器中止了SSL握手”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常当我想推到我的私人回购时,我得到一个服务器中止了SSL握手的错误。经过几次尝试后,它经常突然生效。我仍然无法在网上找到解决方案:(



如果今天不够烦人,我想通过 git安装火炬克隆https://github.com/torch/distro.git〜/ torch --recursive



它每次都在公共 cutorch.git


致命:无法访问' li>

  • 粘贴您的密钥并保存








  • 在第一次设置开放式终端并运行一个 git fetch ,所以这个密钥将被测试并添加到你的已知主机文件中。


    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 wich 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.

    解决方案

    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)
    • Click on the SSH keys and GPG Keys
    • Click on the New SSH key
    • 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.

    这篇关于git和“服务器中止了SSL握手”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆