首页 > 解决方案 > 错误:RPC 失败;curl 56 GnuTLS recv 错误(-12):已收到 TLS 致命警报。Ubuntu

问题描述

目前我在 Ubuntu (20.04.2) 上的 WSL2 中工作。我已经完成了我的项目,我想将我的代码提交到我创建的存储库中。但是,每当我想提交时,都会收到以下错误:

error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

我不知道是什么导致了这个错误。我知道我的凭据是正确的。这些是我为提交代码而执行的命令:

git init
git add .
git commit -m "Finished Project"
git branch -M main
git remote add origin https://github.com/Myusername/my-repo.git
git push -u origin main

在最后一个命令之后,我被要求提供我的凭据,然后我收到错误。

我首先认为这是因为我没有使用openSSL,这导致了错误。如果是这种情况,我该如何解决这个问题?

编辑: 我使用 SSH 时收到的错误:

Received disconnect from 140.82.121.3 port 22:11: Bye Bye
Disconnected from 140.82.121.3 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

标签: gitubuntuwindows-subsystem-for-linux

解决方案


推荐阅读