突然的错误

我今天进行提交新的博文,突然提交不上去,报错如图
hexo部署博客出现的错误

prot 22: Operation timed out

初步判断为端口问题,那么除了ssh端口我们还可以用https 443端口

解决方法

博主本机为win10,那么在/git/etc/ssh/ssh_config文件末尾增加

Host github.com
User [email protected]
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

然后保存。
然后继续在git bash中使用

git config --global user.name "XXX"
git config --global user.email [email protected]

刷新就可以生效


linux中在~/.ssh新建config输入以下内容

Host github.com
User [email protected]
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

后续内容跟上面内容一样更新即可。

相关文章: