关于github报错 ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository.
今天上午写demo的时候,突然pull不下代码了,报了一下这样情况的错误:



看了一下代码,怀疑是网路错误,因为在这以前一切都正常的,然后将代码复制搜索了一番,解决办法有很多什么配置config啦,git config --local -e啦,能试的都测试了,还是不行,最后,不想当时浪费太多开发时间,所以就放下了,大概两个半小时后,又git pull 一下就成功了,没原由的自己好了,当时心里一万个xxx
下面是github如何配置公钥:
在本地生成公钥: ssh-keygen -t rsa -C email@xx.com
进入github 设置

进入设置找到对应配置ssh的位置,将 rsa 文件中的内容复制到github ssh中
查看是否配置成功:ssh -T git@github.com
注意:要clone带ssh的项目
ctrl+l 将界面移动到最上方输入显示
关于github报错 ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository.的更多相关文章
- ssh: connect to host gihub.com port 22: Connection timed out
方案1(本人使用此方案,问题得已解决): 可能是ssh-server未安装或者未启动.我的ubuntu 12.04 默认只安装了openssh-client,并没有安装server. 运行 ps -e ...
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
1. 异常 在连接github时,执行"ssh -T git@github.com" 命令时,出现 ssh: connect to host github.com port 22: ...
- Git配置非22端口,解决:ssh: connect to host xxx port 22: Connection timed out fatal: The remote end hung up unexpectedly
背景:私自搭建了Git服务器,而Git本身就是SSH进行连接的,而Git命令上默认只能通过22端口实现. 解决方法: 第一种: 在系统的用户目录下的文件夹:.ssh 如果该路径下没有config文件, ...
- GitHub上传不了的解决 ssh: connect to host github.com port 22: Bad file number git did not exit cleanly (exit code 128)
问题情况 本来一直用的是github的客户端,结果现在上传的时候出问题了,去网站上看,新项目已经创建,但是代码却怎么都上传不上去.于是只好用命令行的方式解决. Tortoisegit上是这样说的: g ...
- ssh: connect to host github.com port 22: Connection timed out
问题描述 $ git clone git@github.com:MaugerWu/MaugerWu.github.io.git Cloning into 'MaugerWu.github.io'... ...
- 关于github报错:ssh: connect to host github.com port 22: Connection timed outfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
当执行git命令如:git clone.git pull等等 出现报错:ssh: connect to host github.com port 22: Connection timed outfat ...
- git clone遇到的[ssh: connect to host github.com port 22]
起因 在学习递归的时候,对汉诺塔小研究了一番,参考网上写了个demo,后面就想同步到github. 过程 这台电脑是新电脑,所以需要先本地生成ssh key:ssh-keygen -t rsa -C ...
- ssh: connect to host github.com port 22: Connection refused
假设git例如,下面的问题时,远程推送: [fulinux@ubuntu learngit]$ git push -u origin master ssh: connect to host githu ...
- Github拉取远端的时候提示“ssh: connect to host github.com port 22: Connection timed out”错误
在使用Github的时候,如果使用到拉取远端分支的时候或者测试ssh -T git@github.com的时候可能会出现连接失败的问题,错误描述为“ssh: connect to host githu ...
随机推荐
- matplotlib画图总结--多子图布局
1.subplot布局 subplot(nrows, ncols, index, **kwargs) subplot(pos, **kwargs) subplot(ax) x=[1,2,3] valu ...
- nginx 开启gzip压缩
Nginx开启Gzip压缩功能, 可以使网站的css.js .xml.html 文件在传输时进行压缩,提高访问速度,! Web网站上的图片,视频等其它多媒体文件以及大文件,因为压缩效果不好,所以对于 ...
- Recurrence Algorithm Big-Oh Solution
Recurrence Algorithm Big-Oh Solution T(n) = T(n/2) + O(1) Binary SearchO(log n)T(n) = T(n-1) + O(1) ...
- java中Super到底是什么意思?必须举例说明!
[学习笔记] 3."超"关键字(super keyword) Super是一个参考(或说指针)指向他紧邻的父类(见下面的例子).用super可以指向被隐藏的父类的同名成员. 3.1 ...
- 【AtCoder】AGC005
AGC005 A - STring 用一个栈,如果遇到S就弹入,如果遇到T栈里有S就弹出栈顶,否则T在最后的串里,最后计算出的T和栈里剩的S就是答案 #include <bits/stdc++. ...
- Python解Leetcode: 226. Invert Binary Tree
leetcode 226. Invert Binary Tree 倒置二叉树 思路:分别倒置左边和右边的结点,然后把根结点的左右指针分别指向右左倒置后返回的根结点. # Definition for ...
- 文件锁-fcntl flock lockf
这三个函数的作用都是给文件加锁,那它们有什么区别呢? 首先flock和fcntl是系统调用,而lockf是库函数.lockf实际上是fcntl的封装,所以lockf和fcntl的底层实现是一样的,对文 ...
- php分页思路
<?php class page{ public $nowPage=1; public $perPage=10; public $showPage=10; public $totalPage; ...
- spark异常篇-Removing executor 5 with no recent heartbeats: 120504 ms exceeds timeout 120000 ms 可能的解决方案
问题描述与分析 题目中的问题大致可以描述为: 由于某个 Executor 没有按时向 Driver 发送心跳,而被 Driver 判断该 Executor 已挂掉,此时 Driver 要把 该 Exe ...
- 玩linux笔记——持续更新
说在最前面 centos 是基于redhat linux,所以最好的教程在红帽官网 https://access.redhat.com/documentation/en-us/red_hat_ente ...