IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 开发工具 -> github 配置了公钥依旧提示git@github.com‘s password: Permission denied please try again. 的解决办法 -> 正文阅读

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

最近在给新电脑配置GitHub的ssh时,一切都是按照流程进行github上文档的配置流程进行配置,但是把公钥配置到github后,在对仓库进行操作的时候依旧出现一下提示

git@github.com's password:
Permission denied, please try again.

但是按照提示输入github密码也不行。

折腾了好久,什么把key删除重新生成,重新配置公钥,什么文件权限,把密钥配置到代理等等手段都试了,依旧不行,给我整的快怀疑人生了。
但是同样的操作在gitlab上就是正常的,看来我的操作没啥问题,应该是跟github有关系了。

后来使用

ssh -Tv git@github.com

去测试链接并且打印日志,出现以下日志

PS C:\Users\XeonYu> ssh -Tv git@github.com
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to github.com [223.75.236.241] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\XeonYu/.ssh/id_rsa type 0
debug1: identity file C:\\Users\\XeonYu/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_dsa-cert type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\XeonYu/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.6
debug1: Remote protocol version 2.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 as 'git'
debug1: load_hostkeys: fopen C:\\Users\\XeonYu/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-rsa SHA256:rEmlJenVMSL5GVemSY0Gk8WGw6B4ege4J85M+vup8R0
debug1: load_hostkeys: fopen C:\\Users\\XeonYu/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\XeonYu/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\XeonYu/.ssh/id_rsa RSA SHA256:90nUQDrAT7CL+A72pV710fQxoPq4Jp2wmm03u/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-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss>
debug1: 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:90nUQDrAT7CL+A72pV710fQxoPq4Jp2wmm03u/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
git@github.com's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
git@github.com's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
git@github.com's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey,password,keyboard-interactive).

说实话也没看出来哪里有问题。
后来继续翻github文档,看到了这个
https://docs.github.com/cn/authentication/troubleshooting-ssh/using-ssh-over-the-https-port

在这里插入图片描述

于是尝试执行了一下

ssh -T -p 443 git@ssh.github.com

居然就成功了… 看来是所谓的防火墙问题吧
在这里插入图片描述

按照文档提示在config文件中添加一下内容,没有config的话自己新建一个,把后缀名删掉即可。

Host github.com
Hostname ssh.github.com
Port 443
User git

然后再次运行
在这里插入图片描述

这样就ok了,真的是坑啊…


如果你觉得本文对你有帮助,麻烦动动手指顶一下,可以帮助到更多的开发者,如果文中有什么错误的地方,还望指正,转载请注明转自喻志强的博客 ,谢谢!

  开发工具 最新文章
Postman接口测试之Mock快速入门
ASCII码空格替换查表_最全ASCII码对照表0-2
如何使用 ssh 建立 socks 代理
Typora配合PicGo阿里云图床配置
SoapUI、Jmeter、Postman三种接口测试工具的
github用相对路径显示图片_GitHub 中 readm
Windows编译g2o及其g2o viewer
解决jupyter notebook无法连接/ jupyter连接
Git恢复到之前版本
VScode常用快捷键
上一篇文章      下一篇文章      查看所有文章
加:2022-09-30 01:11:02  更:2022-09-30 01:11:38 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年12日历 -2024/12/28 3:46:05-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码
数据统计