前几天手贱,为了匹配公司内部的gitlab的public-key,脑子一抽把github上这个博客的public-key的id_sra.pub文件给删除了,结果hexo d -g推送文章的时候,发现报错:
1 | fatal: Could not read from remote repository. |
然后就去cd ~/.ssh ,使用ssh-keygen -t ed25519 -C "我的邮箱地址"创建一个新的公钥。在
Enter file in which to save the key (/home/我的id/.ssh/id_ed25519)时,输入/home/我的id/.ssh/id_github这样生成了一个id_github.pub的文件用于github。
然后还是在~/.ssh下创建config文件,里面内容是:
1 | # GitHub |
测试一下ssh -T git@github.com,验证通过。
但是再次hexo d -g推送的时候,发现报错send-pack: unexpected disconnect while reading sideband packet:
查了一下说是我缓存区设置小了,使用命令git config --global http.postBuffer 524288000,放大到500mb,问题解决:
但是我就改了一个public-key啊,为啥会说我缓存设置不足了呢,我又没加什么新的东西,这个问题还要深挖一下。