113 字
1 分钟
使用ssh链接github的一些问题
2025-09-16
无标签

起因是这个

Terminal window
ssh: connect to host github.com port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

原因可能是我更新了win11

解决#

这里有几种解决方法,都可以试一下

重新生成ssh-gen#

Terminal window
ssh-keygen -t ed25519 -C "your_email@example.com"

在github->Settings->SSH keys重新new一个 记得删除之前的sshgen

重新验证github#

Terminal window
vi ~/.ssh/config
config
Host github.com
Hostname ssh.github.com
Port 443
Terminal window
ssh -T git@github.com

windows服务#

启用OpenSSH Authentication Agent,并设为自动

Terminal window
ssh-add ~/.ssh/id_ed25519
使用ssh链接github的一些问题
https://blog.sinsa.cc.cd/posts/github-ssh/
作者
SInsa
发布于
2025-09-16
许可协议
CC BY-NC-SA 4.0