新闻详情

新闻详情

首页 / 资讯中心 / 详情

github 配置了公钥依旧提示git@github.com‘s password: Permission denied, please try again. 的解决办法

发布时间:2026/9/25 2:09:24来源:尧图网络
github 配置了公钥依旧提示git@github.com‘s password: Permission denied, please try again. 的解决办法
最近在给新电脑配置GitHub的ssh时一切都是按照流程进行github上文档的配置流程进行配置但是把公钥配置到github后在对仓库进行操作的时候依旧出现一下提示gitgithub.coms password: Permission denied, please try again.但是按照提示输入github密码也不行。折腾了好久什么把key删除重新生成重新配置公钥什么文件权限把密钥配置到代理等等手段都试了依旧不行给我整的快怀疑人生了。但是同样的操作在gitlab上就是正常的看来我的操作没啥问题应该是跟github有关系了。后来使用ssh -Tv gitgithub.com去测试链接并且打印日志出现以下日志PS C:\Users\XeonYussh-Tvgitgithub.com OpenSSH_for_Windows_8.6p1, LibreSSL3.4.3 debug1: Authenticator provider$SSH_SK_PROVIDERdid not resolve;disabling debug1: Connecting to github.com[223.75.236.241]port22. debug1: Connection established. debug1: identityfileC:\\Users\\XeonYu/.ssh/id_rsatype0debug1: identityfileC:\\Users\\XeonYu/.ssh/id_rsa-certtype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_dsatype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_dsa-certtype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ecdsatype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ecdsa-certtype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ecdsa_sktype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ecdsa_sk-certtype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ed25519type-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ed25519-certtype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ed25519_sktype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_ed25519_sk-certtype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_xmsstype-1debug1: identityfileC:\\Users\\XeonYu/.ssh/id_xmss-certtype-1debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.6 debug1: Remote protocol version2.0, remote software version OpenSSH_7.6 debug1: compat_banner: match: OpenSSH_7.6 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002 debug1: Authenticating to github.com:22 asgitdebug1: load_hostkeys: fopen C:\\Users\\XeonYu/.ssh/known_hosts2: No suchfileor directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No suchfileor directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No suchfileor directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex:hostkey algorithm: rsa-sha2-512 debug1: kex: server-client cipher: chacha20-poly1305openssh.com MAC:implicitcompression: none debug1: kex: client-server cipher: chacha20-poly1305openssh.com MAC:implicitcompression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Serverhostkey: ssh-rsa SHA256:rEmlJenVMSL5GVemSY0Gk8WGw6B4ege4J85Mvup8R0 debug1: load_hostkeys: fopen C:\\Users\\XeonYu/.ssh/known_hosts2: No suchfileor directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No suchfileor directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No suchfileor directory debug1: Hostgithub.comis known and matches the RSAhostkey. debug1: Found keyinC:\\Users\\XeonYu/.ssh/known_hosts:1 debug1: rekey out after134217728blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekeyinafter134217728blocks debug1: pubkey_prepare: ssh_get_authentication_socket: No suchfileor directory debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_rsa RSA SHA256:90nUQDrAT7CLA72pV710fQxoPq4Jp2wmm03u/2c3X0 debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_dsa debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_ecdsa debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_ecdsa_sk debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_ed25519 debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_ed25519_sk debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_xmss debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algsssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dssdebug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Offering public key: C:\\Users\\XeonYu/.ssh/id_rsa RSA SHA256:90nUQDrAT7CLA72pV710fQxoPq4Jp2wmm03u/2c3X0 debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Trying private key: C:\\Users\\XeonYu/.ssh/id_dsa debug1: Trying private key: C:\\Users\\XeonYu/.ssh/id_ecdsa debug1: Trying private key: C:\\Users\\XeonYu/.ssh/id_ecdsa_sk debug1: Trying private key: C:\\Users\\XeonYu/.ssh/id_ed25519 debug1: Trying private key: C:\\Users\\XeonYu/.ssh/id_ed25519_sk debug1: Trying private key: C:\\Users\\XeonYu/.ssh/id_xmss debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: password gitgithub.coms password: debug1: Authentications that can continue: publickey,password,keyboard-interactive Permission denied, please try again. gitgithub.coms password: debug1: Authentications that can continue: publickey,password,keyboard-interactive Permission denied, please try again. gitgithub.coms password: debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Nomoreauthentication methods to try. gitgithub.com: Permission denied(publickey,password,keyboard-interactive).说实话也没看出来哪里有问题。后来继续翻github文档看到了这个https://docs.github.com/cn/authentication/troubleshooting-ssh/using-ssh-over-the-https-port于是尝试执行了一下ssh-T-p443gitssh.github.com居然就成功了… 看来是所谓的防火墙问题吧按照文档提示在config文件中添加以下内容,没有config的话自己新建一个(就在你的.ssh文件夹内)把后缀名删掉即可。Host github.com Hostname ssh.github.com Port443Usergit然后再次运行这样就ok了真的是坑啊…如果你觉得本文对你有帮助麻烦动动手指顶一下可以帮助到更多的开发者如果文中有什么错误的地方还望指正转载请注明转自喻志强的博客 谢谢
网站建设高端定制企业官网
RELATED

相关资讯

更多精彩内容,欢迎继续阅读

较早相关资讯

最新相关资讯

LTspice仿真10种经典运放电路:从原理到实践 2026/9/25 2:53:39

LTspice仿真10种经典运放电路:从原理到实践

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

阅读更多 →
HowToGraphQL 之 TypeScript + Apollo Server 全栈 GraphQL 服务实战总结:从零搭建到生产部署 2026/9/25 2:53:33

HowToGraphQL 之 TypeScript + Apollo Server 全栈 GraphQL 服务实战总结:从零搭建到生产部署

【免费下载链接】howtographql The Fullstack Tutorial for GraphQL 项目地址: https://gitcode.com/gh_mirrors/ho/howtographql 点击查看 免费下载 本篇是 HowToGraphQL 仓库中 TypeScript Apollo 系列教程 的收官总结,系统回顾以 TypeScript、Apoll…

阅读更多 →
OpenChamber 隔离空间 Dispatcher 识别机制:为何选择客户端前缀寻址而非服务端嗅探 2026/9/25 2:53:33

OpenChamber 隔离空间 Dispatcher 识别机制:为何选择客户端前缀寻址而非服务端嗅探

AI Agent人工智能代码智能体交互助手 【免费下载链接】openchamber Agentic Development Environment based on OpenCode AI agent 项目地址: https://gitcode.com/gh_mirrors/op/openchamber 点击查看 免费下载 OpenChamber 的“隔离空间(isolated spa…

阅读更多 →
账单爆表事故复盘:给单个 Agent 协程装上预算闸门,拦住 3000 万 Token 的非确定性 LLM 消耗 2026/9/25 2:53:33

账单爆表事故复盘:给单个 Agent 协程装上预算闸门,拦住 3000 万 Token 的非确定性 LLM 消耗

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

阅读更多 →
CodeGuide 本地任务消息组件:基于门牌号分片扫描的动态任务补偿处理,兜住 HTTP/MQ 通知的最终一致性 2026/9/25 2:53:32

CodeGuide 本地任务消息组件:基于门牌号分片扫描的动态任务补偿处理,兜住 HTTP/MQ 通知的最终一致性

文档教程后端 【免费下载链接】CodeGuide :books: 本代码库是作者小傅哥多年从事一线互联网 Java 开发的学习历程技术汇总,旨在为大家提供一个清晰详细的学习教程,侧重点更倾向编写Java核心内容。如果本仓库能为您提供帮助,请给予支持(关注、…

阅读更多 →
CTF-Wiki Android 逆向实战:IDA 动态调试原生层程序与 so 库的完整流程 2026/9/25 2:53:32

CTF-Wiki Android 逆向实战:IDA 动态调试原生层程序与 so 库的完整流程

文档网络安全教程 【免费下载链接】ctf-wiki Come and join us, we need you! 项目地址: https://gitcode.com/gh_mirrors/ct/ctf-wiki 点击查看 免费下载 本篇技术指南系统讲解如何使用 IDA 对 Android 原生层程序进行动态调试:从 android_server 调试…

阅读更多 →

今日资讯

本周资讯

本月资讯

看完文章仍有疑问?

联系尧图顾问,获取一对一建站咨询

立即免费咨询 📞 400-888-8888
📞 ✉