运行ssh -T git@github.com报错

运行ssh -T git@github.com报错

no such identity: /root/.ssh/id_rsa: No such file or directory

git@ssh.github.com: Permission denied (publickey).

如果我用的是ed25519而非rsa,有id_ed25519

则需要打开~/.ssh/config检查一下是否写错了

vim ~/.ssh/config

然后发现果然写错了

应该是

IdentityFile ~/.ssh/id_ed25519

而非rsa

网上的这份答案除了id_rsa这里需要注意外其他都是合适的。

Host github.com

Hostname ssh.github.com

User git

Port 443

PreferredAuthentications publickey

IdentityFile ~/.ssh/id_ed25519

相关推荐
wangruofeng4 小时前
7.1 万 Star 的 MinerU,把 PDF 变成 LLM 能读懂的 Markdown
github
wangruofeng4 小时前
75k Star 的 OCR 传奇——Tesseract 的 40 年,从 HP 实验室到 LSTM 神经网络
github
逛逛GitHub7 小时前
又挖到 3 个不错的 GitHub 项目,尤其是第 2 个。
github
逛逛GitHub7 小时前
GitHub 上 13 万星的爬虫神器,不要 API Key 就能用了。
github
kyriewen7 小时前
别再每次都 Google 了:我整理了前端日常最常踩的 10 个 Git 坑,附速查表
前端·javascript·git
一点一木14 小时前
🚀 2026 年 6 月 GitHub 十大热门项目排行榜 🔥
人工智能·github
OpenTiny社区1 天前
从零开发 AI 聊天页要两周?试试这款 Vue3 垂直对话组件库 TinyRobot,直接开箱即用
前端·vue.js·github
逛逛GitHub1 天前
2 万多 Star!Google 开源了这个神级 GitHub 项目。
github
逛逛GitHub1 天前
免费 Token 烧掉 5 万亿之后,他们出了个一站式创作平台。
github
用户805533698032 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式