gpt4 book ai didi

windows-7 - GitHub:ssh -T git@github.com -> 权限被拒绝(公钥)。 [Windows 7的]

转载 作者:行者123 更新时间:2023-12-02 00:23:42 25 4
gpt4 key购买 nike

我遇到了问题,在 stackoverflow 或 google 上没有找到任何内容。
当我运行 ssh -T git@github.com 时,我收到错误 Permission denied (publickey)。

Git 帮助指南中的帮助没有帮助。
有人能帮我吗?

好的,我得到了解决方案,也许有人需要它,所以我们开始吧:

好的,我终于明白了。

首先是说我在这里运行的是德语 64 位的 Windows 7 操作系统!我不知道这是否重要。

好吧,在本指南中:http://help.github.com/win-set-up-git/他们说,在 C:/Users/[PC-Name]/.ssh/中创建的文件

所以在这个文件夹中应该有文件 id_rsa 和 id_rsa.pub。当我查找它们时,我什至找不到文件夹。那么必要的文件在哪里呢?

我运行搜索并在以下位置找到它们:C:\Users[yourpcname]\AppData\Local\VirtualStore\Windows\SysWOW64

我不知道他们为什么或如何到达那里。我从来没有打过这条路。
好的,现在只需复制文件并在 C:/Users/[PC-Name]/中创建 .ssh 文件夹移动到目录 .ssh 并粘贴两个文件 id_rsa 和 id_rsa.pub。

然后不要运行 ssh -T git@github.com
但:

ssh -T git@github.com -i <path-to-id_rsa>

并小心使用 C:/.../.../ 而不是 C:\...\...\..

这解决了我的问题。也许你有同样的问题。

最佳答案

另一个 SO 帖子包含解决方案:

Permission denied (publickey) when deploying heroku code. fatal: The remote end hung up unexpectedly

尝试将 id_rsaid_rsa.pub 复制到 Git 安装文件夹中。
像这样:C:\users\user\.sshC:\Program Files (x86)\Git\.ssh

关于windows-7 - GitHub:ssh -T git@github.com -> 权限被拒绝(公钥)。 [Windows 7的],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9819357/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com