简体   繁体   English

git@github.com:权限被拒绝(公钥)。 但是 ssh git@github.com 有效

[英]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 工作正常

  • It's not a key problem, because I can authenticate to my Linux machines and Github successfully both with using the agent as well as the unencrypte id_rsa file.这不是关键问题,因为我可以使用代理和未加密的id_rsa文件成功地对我的 Linux 机器和 Github 进行身份验证。
  • It's not the agent problem, because the agent loads the key correctly, it works with SSH my linux machines.这不是代理问题,因为代理正确加载了密钥,它适用于 SSH 我的 linux 机器。

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.

相关问题 git@github.com:权限被拒绝(公钥) - git@github.com: Permission denied (publickey) 获取ssh git@github.com:权限被拒绝(公钥) - Fetching ssh git@github.com: Permission denied (publickey) Git Submodule git@github.com:权限被拒绝(公钥)错误 - Git Submodule git@github.com: Permission denied (publickey) error git@github.com:权限被拒绝(公钥)错误 - git@github.com: Permission denied (publickey) ERROR 为什么 git@github.com:Windows 中的权限被拒绝(公钥)? - Why git@github.com: Permission denied (publickey) in windows? ssh -T git@github.com:你已经成功认证 | sudo git pull:权限被拒绝(公钥) - ssh -T git@github.com: You've successfully authenticated | sudo git pull: Permission denied (publickey) OpenSSH:git@github.com权限被拒绝 - OpenSSH: git@github.com permission denied git@github.com:使用纱线安装github js package时权限被拒绝(公钥) - git@github.com: Permission denied (publickey) when using yarn to install github js package Git 子模块:git@github.com:权限被拒绝(公钥)。 致命:无法从远程存储库中读取 - Git submodule: git@github.com: Permission denied (publickey). fatal: Could not read from remote repository 我收到此错误 git@github.com: Permission denied (publickey), 当我在新 Mac 上 git push 时 - I get this error git@github.com: Permission denied (publickey), when I git push on new mac
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM