Github拉取远端的时候提示“ssh: connect to host github.com port 22: Connection timed out”错误
在使用Github的时候,如果使用到拉取远端分支的时候或者测试ssh -T git@github.com的时候可能会出现连接失败的问题,错误描述为“ssh: connect to host github.com port 22: Connection timed out”,这个是由于链接Github相应端口的时候出错。解决方案由两个
方法一:
在克隆项目的时候使用git clone https://xxxx,避开使用git clone git@github.com/xxx
方法二:
在id_rsa同级目录下新建config文本文件,并写入如下代码
Host github.com
User YourEmail@163.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
强制将git协议修改为https的443端口,
建议使用方法二,新建文件之后,新开git bash窗口,然后使用ssh -T git@github.com查看连接状态,出现如下信息就标识已经成功设置了。

Github拉取远端的时候提示“ssh: connect to host github.com port 22: Connection timed out”错误的更多相关文章
- 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: ...
- 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'... ...
- 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默认端口22被占用,ssh: connect to host github.com port 22: Connection timed out
出现github 连接错误: ssh:connect to host github.com port 22:Connection timed out 刚开始以为是网络问题,github不能连接上,但是 ...
- 关于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 ...
- $ ssh -T git@github.com ssh: connect to host ssh.github.com port 22: Connection timed out
在C:/用户/用户名/.ssh中添加几个文件 之前的电脑生成都是四个文件,分别是 id_rsa id_rsa.pub config known_hosts 不知道为什么在另一台电脑上却生成两个文件 ...
随机推荐
- django笔记 - 建站
1,建站步骤:1)django-admin.exe startproject mysite 创建完后的目录结构: - mysite # 对整个程序进行配置 - init - settings # 配置 ...
- LeetCode--404--左叶子之和
问题描述: 计算给定二叉树的所有左叶子之和. 示例: 3 / \ 9 20 / \ 15 7 在这个二叉树中,有两个左叶子,分别是 9 和 15,所以返回 24 方法:recursive class ...
- 20170706xlVBA汇总历时对阵数据
Public Sub GatherFilesData() Application.ScreenUpdating = False Application.DisplayAlerts = False Ap ...
- ssh登陆报错:packet_write_wait: Connection to x.x.x.x port 22: Broken pipe
ssh登陆报错:packet_write_wait: Connection to x.x.x.x port 22: Broken pipe 参考文章: https://patrickmn.com/as ...
- android--------自定义控件 之 基本实现篇
前面简单的讲述了Android中自定义控件中的几个方法,今天通过代码来实现一个简单的案例 自定义一个扇形图 自定义控件示例: 这里先介绍继承View的方式为例 public class Circula ...
- BGP华为、思科选路规则
选路规则 华为BGP选路规则 思科BGP选路规则 第0条 下一跳是否可达,如果不可达则不参与选路 BGP 向IBGP对等体发布import引入的IGP路由时, 将下一跳属性改为自身的接口地址,而非IG ...
- 【洛谷p2430】严酷的训练
(这个题有一个很神奇的地方) 严酷的训练[传送门] 算法标签(显然01背包了最近一直在练) (他居然没写……) 这个题啊,试了好几遍没a 最后发现在第二层循环的时候应该是j>=rqyt[p[i] ...
- 【Oracle】【3】字段自增长(+1)
业务场景——解决方案 1,每插入一条数据,其排序字段要增长1 —— Service层查询出最大值,再+1(参考博客的方法是触发器) 2,子表插入一条数据,主表某字段+1 —— where A.ID = ...
- C++的字符串多行输入
#include<iostream> using namespace std; int main() { int r, c; char grid[50][51]; cout << ...
- 17. Letter Combinations of a Phone Number C++回溯法
简单的回溯法! class Solution { public: void backTrack(string digits, vector<string> words, string an ...