简体   繁体   English

失败推。 与github.com相关的未知SSL协议错误:443

[英]Failure to push. Unknown SSL protocol error in connection to github.com:443

I am a new Git/GitHub Windows user. 我是Git / GitHub Windows的新用户。 Using a fresh install of git and following a Lynda.com tutorial instructions, I have created the GitHub repo, generated the ssh, added the ssh key to my GitHub account,and authenticated the connection to GitHub. 使用全新安装的git并遵循Lynda.com教程的说明,我创建了GitHub存储库,生成了ssh,将ssh密钥添加到了我的GitHub帐户,并验证了与GitHub的连接。

When I try to push, I receive the error: 当我尝试推送时,收到错误消息:

Unknown SSL protocol error in connection to github.com:443

I have thoroughly perused StackOverflow and found similar questions, but I am unable to resolve a solution that works for me. 我已经仔细研究过StackOverflow并发现了类似的问题,但是我无法解决适合我的解决方案。 I have posted the relevant git commands below. 我已经在下面发布了相关的git命令。 Any help is appreciated. 任何帮助表示赞赏。

owner@LAPTOP-0FP78GPS /c/users/owner/Documents/explore_california (master)
$ git remote add origin https://github.com/PrinceHumperdinck/explore_california.git

owner@LAPTOP-0FP78GPS /c/users/owner/Documents/explore_california (master)
$ git remote
origin

owner@LAPTOP-0FP78GPS /c/users/owner/Documents/explore_california (master)
$ git push -u origin master
fatal: unable to access 'https://github.com/PrinceHumperdinck/explore_california.git/': Unknown SSL protocol error in connection to github.com:443

owner@LAPTOP-0FP78GPS /c/users/owner/Documents/explore_california (master)
$ ls -al ~/.ssh

total 18
drwxr-xr-x    1 owner    Administ        0 Aug  6 14:07 . 
drwxr-xr-x    1 owner    Administ    28672 Aug 10 11:57 ..
-rw-r--r--    1 owner    Administ     3326 Aug 10 10:51 id_rsa
-rw-r--r--    1 owner    Administ      749 Aug 10 10:51 id_rsa.pub
-rw-r--r--    1 owner    Administ     1226 Aug  6 23:47 known_hosts

owner@LAPTOP-0FP78GPS /c/users/owner/Documents/explore_california (master)
$ ssh -T git@github.com
Hi PrinceHumperdinck! You've successfully authenticated, but GitHub does not provide shell access.

owner@LAPTOP-0FP78GPS /c/users/owner/Documents/explore_california (master)
$ git version
git version 1.9.4.msysgit.2

There are two main ways to access a Git-based source control service such as GitHub or GitLab, is through HTTPS or SSH. 通过HTTPS或SSH访问基于Git的源代码控制服务(例如GitHub或GitLab)的主要方法有两种。 At the moment you're using the HTTPS method which requires you to authenticate every Fetch, Push or Pull request with your username and password. 目前,您正在使用HTTPS方法,该方法要求您使用用户名和密码对每个Fetch,Push或Pull请求进行身份验证。 That's why you get this error. 这就是为什么您会收到此错误。

How to fix 怎么修

Since you have added your SSH key to the GitHub account: 由于您已将SSH密钥添加到GitHub帐户,因此:

  1. Goto the repository click "Clone or download" 转到存储库,单击“克隆或下载”
  2. Click "Use SSH" on the top right corner of the popup box. 单击弹出框右上角的“使用SSH”。 ignore this step if it says "Use HTTPS" 如果显示“使用HTTPS”,请忽略此步骤
  3. Copy the link, it should look something like this git@github.com:PrinceHumperdinck/explore_california.git 复制链接,它应该看起来像这样git@github.com:PrinceHumperdinck/explore_california.git
  4. Goin to the local copy (folder) and run this git remote set-url ORIGIN git@github.com:PrinceHumperdinck/explore_california.git . 转到本地副本(文件夹)并运行此git remote set-url ORIGIN git@github.com:PrinceHumperdinck/explore_california.git Substitute ORIGIN with the value before the URL of this command git remote -v 用此命令的URL之前的值替换ORIGIN git remote -v
  5. Run git fetch and if that works. 运行git fetch ,如果可行。 Run git push . 运行git push

If step 4 doesn't work for you, you can always clone it again with git clone git@github.com:PrinceHumperdinck/explore_california.git 如果第4步对您不起作用,您始终可以使用git clone git@github.com:PrinceHumperdinck/explore_california.git再次克隆它。

Side note, if you're not familiar with command line GIT you can use GUI tools like Sourcetree for free or GitKraken free for personal use (with annoying popup box) 旁注,如果您不熟悉命令行GIT,则可以免费使用GUI工具(例如Sourcetree)或免费使用GitKraken (供个人使用)(带有令人讨厌的弹出框)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Grunt / Git抛出与github.com:443相关的未知SSL协议错误 - Grunt/Git throws Unknown SSL protocol error in connection to github.com:443 Git Clone:与github.com:443相关的未知SSL协议错误 - Git Clone : Unknown SSL protocol error in connection to github.com:443 Git Push失败:致命:无法访问与github.com有关的未知SSL协议错误:-9805 - Git Push failed: fatal: unable to access Unknown SSL protocol error in connection to github.com:-9805 无法访问'https://github.com/AFNetworking/AFNetworking.git/':与github.com:9847相关的未知SSL协议错误 - unable to access 'https://github.com/AFNetworking/AFNetworking.git/': Unknown SSL protocol error in connection to github.com:-9847 OpenSSL SSL_connect:连接被重置连接到 github.com:443 同时尝试 git 推送 - OpenSSL SSL_connect: Connection was reset in connection to github.com:443 while try to git push SSL_connect:SSL_ERROR_SYSCALL 连接到 github.com:443 - SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 致命:无法访问“https://github.com/xxx”:LibreSSL SSL_connect: SSL_ERROR_SYSCALL 连接到 github.com:443 - fatal: unable to access 'https://github.com/xxx': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 Gitblit:连接到mydomain的未知SSL协议错误:443 - Gitblit: Unknown SSL protocol error in connection to mydomain:443 无法推送 - 无法连接到github.com端口443:连接被拒绝 - Could not push--Failed to connect to github.com port 443: Connection refused 在 AWS 实例中克隆 git repo? 我收到错误:无法连接到 github.com 端口 443:连接超时 - Cloning a git repo in AWS Instance? I get the error : Failed to connect to github.com port 443: Connection timed out
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM