ssh: connect to host github.com port 22: Connection timed out
文章目录
问题
git 拉取代码报错 (使用 https 或 git 方式拉取代码)
ssh: connect to host github.com port 22: Connection timed out
分析
1. github官网防火墙问题
2. 中间的传输网络问题
3. 电脑防火墙问题解决
在 生成的 .ssh 中新建文件 config, 增加如下代码
Host github.com
User 你的邮箱
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443再次拉取代码,看是否成功
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论