git bash

一、就是单纯没网了

1
2
3
4
5
6
7
8
9
10
11
ssh: Could not resolve hostname github.com: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (E:\Myblog\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:513:28)
at cp.emit (E:\Myblog\node_modules\cross-spawn\lib\enoent.js:34:29)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)

二、多个免密怎么搞

我之前已经有一个git和github间的免密登录了;

之后又配置了一个vscode和虚拟机之间的免密登录,把上面那个覆盖了,之后我git更新博客的时候,出错了

生成的id_rsa不重名就行了

之后改改主机上的.ssh/config,配置如下

1
2
3
4
5
6
7
8
9
10
11
Host github.com
HostName ssh.github.com
Port 443
User git
IdentityFile ~/.ssh/id_rsa
#centos
Host 192.168.1.89
Hostname 192.168.1.89
User root
IdentityFile ~/.ssh/id_rsa_centos

三、git -T git @github.com出错

kex_exchange_identification: Connection closed by remote host

我的是因为上面config里,手写成了HostName github.com,少一个 ssh.

  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2023-2025 是羽泪云诶
  • 访问人数: | 浏览次数:

请我喝杯咖啡吧~

支付宝
微信