使用代理连接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是否成功连接
相关推荐
乱码三千18 分钟前
使用 Docker-compose 搭建SRS直播中转服务端
后端·架构·github
kcuwu.30 分钟前
1. 得到一个好的github仓库后的——学习路径规划(以最近要学的orbit为例)
github
CSDN官方博客9 小时前
GitHub Copilot 新手极速上手指南
github·copilot
用户57844292286214 小时前
GraphRAG 与 LightRAG
github
峰向AI14 小时前
别再花几万块搭 Agent 了,[微软开源] 3500 行框架让 AI 自己练级
github
解道Jdon1 天前
JDK 27发布:紧凑对象头、G1默认、量子安全TLS
ide·windows·git·svn·eclipse·github·visual studio
m4Rk_1 天前
【论文阅读】Agent 记忆机制(72):EMA——在写入前决定什么值得记住
论文阅读·人工智能·学习·开源·github
OpenTiny社区1 天前
从开发到运行:OpenTiny NEXT 如何构建 Agent 时代的 Web 应用?
前端·github·ai编程
政安晨1 天前
政安晨【超级AI智能体~技术简报】- Skills 元方法论霸榜 + Agent Harness 爆发 + 反直觉叙事的胜利
github·开源项目·ai agent·技术简报·政安晨
QUOR1 天前
ZorvAI APK 插件框架 · 技术架构与功能介绍
github·apk·编程语言