You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GitHub突发访问失败,报错Permission denied (publickey,password,keyboard-interactive)求助

解决GitHub Permission denied (publickey, password, keyboard-interactive) 问题

以下是几个常见排查方向和解决方法:

  • 多SSH密钥冲突
    本地存在多个SSH密钥时,Git可能默认选用了非GitHub对应的密钥。先手动指定密钥测试连接:

    ssh -i ~/.ssh/你的GitHub私钥文件名 -T git@github.com
    

    如果测试成功,说明是密钥选择问题,可在~/.ssh/config中添加专属配置:

    Host github.com
      HostName github.com
      User git
      IdentityFile ~/.ssh/你的GitHub私钥文件名
    
  • 网络/代理干扰
    关闭本地代理、VPN,或切换网络后重新测试:

    ssh -T git@github.com
    

    部分防火墙会拦截SSH流量,导致密钥验证失败,触发平台 fallback 到其他验证方式。

  • SSH客户端配置异常
    检查/etc/ssh/ssh_config或~/.ssh/config,若存在全局强制开启键盘交互验证的配置:

    Host *
      KeyboardInteractiveAuthentication yes
    

    针对github.com单独设置关闭:

    Host github.com
      KeyboardInteractiveAuthentication no
    
  • 确认GitHub密钥状态
    登录GitHub账号,进入「Settings」→「SSH and GPG keys」,核实重新配置的公钥已添加且未被标记失效。

内容的提问来源于stack exchange,提问作者haowang

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 23:15:41