gpt4 book ai didi

git 和 "Server aborted the SSL handshake"错误

转载 作者:IT王子 更新时间:2023-10-29 01:02:08 26 4
gpt4 key购买 nike

当我想推送到我的私有(private)仓库时,我经常会收到“服务器中止 SSL 握手”错误。经过几次尝试后,它通常会突然起作用。我还无法在互联网上找到解决方案。

如果今天这还不够烦人的话,我想通过 git clone https://github.com/torch/distro.git ~/torch --recursive

安装 torch

它每次在公共(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

然而,当我自己执行这一行时,它工作正常:

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

现在我必须重新启动失败的安装过程,因为该文件夹已经存在。所以除非这个问题得到解决,否则我不能使用手电筒?

我安装了最新版本的 git(2.8.1) 并使用 Mac OS 10.11.4。

如何解决这个烦人的 SSL 握手错误?

更新:可能是我的ISP造成的。我也遇到过 HTTPS 和 iTunes Store 连接方面的问题。

最佳答案

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 :(

这可能是您使用的不同 ssl 版本的问题。

为了修复它,生成一个新的 ssl ( RSA) 证书,并使用这个新证书更新您的 GitHub 帐户。

Here is how to set it up:

  • 生成一个新的 ssh key 。 *将 -t 设置为 rsa 以避免将来出现连接问题。

    ssh-keygen -t rsa
  • 在您的 %HOME%/.ssh 中生成生成后目录 ( windows: Users/<your user>.ssh ),打开它并复制 <keyname>.pub 的内容


How to set up ssh key under your GitHub account?

  • 登录 GitHub 账号
  • 点击右上角的 Rancher ( Settings )
    enter image description here
  • 点击 SSH keys and GPG Keys
    enter image description here
  • 点击 New SSH key
    enter image description here
  • 粘贴您的 key 并保存

Note

第一次设置后打开终端并运行 git fetch所以 key 将被测试并添加到您的 known hosts文件。

关于git 和 "Server aborted the SSL handshake"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36936678/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com