简体   繁体   English

如何在 WIndows 上仔细检查我的 SSH 凭据?

[英]How to doublecheck my SSH credentials on WIndows?

I am a member of my company organization.我是我公司组织的成员。 SSH keys associated with my account.与我的帐户关联的 SSH 密钥。 Nothing works as expected.没有按预期工作。 I am trying to push my branch我正在尝试推动我的分支

$ 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.

I cloned my comp private repo(details changed for security reasons)我克隆了我的 comp 私人仓库(出于安全原因更改了详细信息)

origin  git@github.com:mycomp/repo-pr (fetch)
origin  git@github.com:mycomp/repo-pr (push)

I will copy just part of the ssh -Tv git@github.com due to length由于长度原因,我将仅复制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

I am running all of these from Git Bash.我从 Git Bash 运行所有这些。

What should I try now?我现在应该尝试什么?

First, make sure that https://github.com/mycomp/repo-pr does exist (meaning the case, uper or lower, of the URL is correct)首先,确保https://github.com/mycomp/repo-pr确实存在(意味着 URL 的大小写是正确的)

Second, check that you are correctly authenticated by GitHub through SSH:其次,检查您是否通过 SSH 被 GitHub 正确认证:

ssh -Tv git@github.com

Third, double-check with your org admins that you are indeed a member of said organization.第三,与您的组织管理员再次确认您确实是该组织的成员。

On Windows, make sure you don't have a GIT_SSH environment variable set.在 Windows 上,确保您没有设置 GIT_SSH 环境变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM