[英]git@github.com: Permission denied (publickey) . But ssh git@github.com works
Using GIT and SSH on Windows.在 Windows 上使用 GIT 和 SSH。 RSA Private key is loaded to the ssh-agent.
RSA 私钥被加载到 ssh-agent。 SSH-agent is running.
SSH 代理正在运行。
ssh-add -l # lists my private key successfully
SSH to any of my Linux machines work nicely. SSH 到我的任何 Linux 机器都运行良好。
ssh username@AnyOfMyRemoteLinuxmachines # I get a successful passwordless access
SSH to the git@github.com authenticates okay. SSH 到 git@github.com 验证正常。 ssh git@github.com
ssh git@github.com
PS > ssh git@github.com
PTY allocation request failed on channel 0
Hi user! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
GIT clone refusing access to a pubic git repository: For example: GIT 克隆拒绝访问公共 git 存储库:例如:
PS G:\My Drive\Projekti\2022\Ansible> git clone org-23183426@github.com:smallstep/crypto.git
Cloning into 'crypto'...
org-23183426@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
However, if I copy my unencrypted id_rsa
file to the ~/.ssh/id_rsa
directory, git works okay但是,如果我将未加密的
id_rsa
文件复制到~/.ssh/id_rsa
目录,git 工作正常
id_rsa
file.id_rsa
文件成功地对我的 Linux 机器和 Github 进行身份验证。 Any other ideas?还有其他想法吗?
Your question title says:你的问题标题说:
git@github.com: Permission denied (publickey)
But your question says:但你的问题是:
org-23183426@github.com: Permission denied (publickey).
You should consider trying to gain access as git
, not as org-23183426
(both @github.com
).您应该考虑尝试以
git
而不是org-23183426
(两者都是@github.com
)的身份获得访问权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.