使用代理连接Github异常

1. 问题表象

将自己本机的~/.ssh/id_ed25519.pub公钥配置到Github中的SSH and GPG keys之后,在本机命令行执行ssh -T git@github.com提示输入密码而非输出Hi github用户名! You've successfully authenticated, but GitHub does not provide shell access.,得出结论->ssh连接异常

2. 排查过程

  • 执行ssh -vT git@github.com开启debug模式分析连接github的ssh输出日志
bash 复制代码
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive

发现本机私钥在连接中被拒绝->怀疑代理问题->尝试3.解决方案后连接成功

3. 解决方案

  • 使用代理连接github,22端口流量容易被代理劫持污染,执行vim ~/.ssh/config将如下配置,写入~/.ssh/config文件,强制ssh连接ssh.github.com:443
bash 复制代码
Host github.com
  HostName ssh.github.com
  Port 443
  User git
  IdentityFile ~/.ssh/id_ed25519
  AddKeysToAgent yes
  UseKeychain yes
  • 执行ssh -T git@github.com测试ssh是否成功连接
相关推荐
小弥儿9 小时前
GitHub今日热榜 | 2026-08-26:AI 大脑与知识管理扎堆
人工智能·学习·开源·github
阿里嘎多学长9 小时前
2026-08-24 GitHub 热点项目精选
开发语言·程序员·github·代码托管
其实防守也摸鱼10 小时前
信创是什么:一文读懂信息技术应用创新
人工智能·阿里云·云计算·github·copilot
秃秃秃秃哇11 小时前
fatal: the remote end hung up unexpectedl
github
峰向AI11 小时前
Label Studio:数据标注领域的"瑞士军刀",文本、音频、视频、图片、时序全部拿捏
github
逛逛GitHub13 小时前
把这个国产神器接入你的 Codex 或 Claude Code,图片秒变 3D 模型。
github
chongzhe13 小时前
AgentConnect:多 Agent 协作的开源版 Claude Tag
人工智能·github·源码
蚂蚁集团数据体验技术13 小时前
推荐免费工具,AntV 开源社区出品数据可视化产品 Sive
github·agent·数据可视化
用户693717500138414 小时前
前阵子刷屏的 Ox-Alpha 真身揭晓!GLM-5.3-Flash 上线,这价格真的杀疯了
前端·后端·github
浪潮行舟16 小时前
使用 Notion 和 GitHub 构建知识库系列一
github·notion