git - 如何在 Windows 上仔细检查我的 SSH 凭据?
问题描述
我是我公司组织的成员。与我的帐户关联的 SSH 密钥。没有按预期工作。我正在尝试推动我的分支
$ git push -u origin mirispc
The authenticity of host 'github.com (140.82.121.4)' can't be established.
RSA key fingerprint is SHA256:$$$$$$$$$$$$$$$$$.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (RSA) to the list of known hosts.
ERROR: Repository not found.
fatal: Could not read from remote repository.
我克隆了我的 comp 私人仓库(出于安全原因更改了详细信息)
origin git@github.com:mycomp/repo-pr (fetch)
origin git@github.com:mycomp/repo-pr (push)
ssh -Tv git@github.com
由于篇幅原因,我将只复制部分内容
OpenSSH_8.5p1, OpenSSL 1.1.1k 25 Mar 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: Connection established.
debug1: identity file /c/Users/jholmes/.ssh/id_rsa type -1
debug1: identity file /c/Users/jholmes/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/jholmes/.ssh/id_dsa type -1
debug1: identity file /c/Users/jholmes/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/jholmes/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/jholmes/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/jholmes/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/jholmes/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/jholmes/.ssh/id_ed25519 type 3
debug1: identity file /c/Users/jholmes/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/jholmes/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/jholmes/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/jholmes/.ssh/id_xmss type -1
debug1: identity file /c/Users/jholmes/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.5
debug1: Remote protocol version 2.0, remote software version babeld-22beb20a
debug1: compat_banner: no match: babeld-22beb20a
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /c/Users/jholmes/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
And
debug1: load_hostkeys: fopen /c/Users/jholmes/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/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/jholmes/.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
....
Hi JHolmes! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
我从 Git Bash 运行所有这些。
我现在应该尝试什么?
解决方案
首先,确保https://github.com/mycomp/repo-pr确实存在(意味着 URL 的大小写正确)
其次,检查你是否通过 SSH 被 GitHub 正确认证:
ssh -Tv git@github.com
第三,与您的组织管理员再次确认您确实是该组织的成员。
在 Windows 上,确保您没有设置 GIT_SSH 环境变量。
推荐阅读
- gatsby - 如何通过 gatsby-transformer-asciidoc 从本地目录获取图像文件?
- python-3.x - 按日期分组到星期
- php - Docker配置虚拟域名错误,无法访问
- opendaylight - 醒酒器框架在 OpenDaylight Karaf shell 中无法按预期工作
- jquery - 自动完成选择名称并将 id 插入隐藏输入
- unit-testing - 在 Jest 中模拟模块时如何断言默认导出函数被调用?
- sql - 计算内部连接的所有记录
- php - 如何根据房间类型和时间用户输入显示房间可用性?我必须加入 2 张桌子
- typescript - 创建一个 TypeScript 界面模板
- asp.net - 使用任何字段构建 URL