【发布时间】:2021-11-23 23:45:30
【问题描述】:
我克隆了一个存储库,效果很好。 不幸的是,我里面的文件有问题,所以我决定从新开始。 我删除了github上的repo和我电脑上的文件夹。
之后我再次创建了 repo 并尝试将其克隆回 PC 我一直收到此错误。
git.exe clone --progress -v "git@github.com:USER/REPOSITORY.git" "E:\FOLDERNAME"
Cloning into 'E:\FOLDERNAME'...
git@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.
git did not exit cleanly (exit code 128) (672 ms @ 03.10.2021 01:07:48)
我尝试了很多方法来解决这个问题:
- 重新生成新的 SSH 密钥并将其存储在 github 上
- 创建另一个具有不同名称的存储库
- 重新安装乌龟git
- 还试图找到一个index.lock(找不到)
- 重新配置名称和电子邮件(也使用 git bash)(这些信息是否必须与 github 帐户上的相同?)
这很奇怪,但尽管我重新安装了全新的 tortoise git,但他仍然显示正确的 SSH-Key 路径,但它是灰色的,所以如果我想更改,我也无法更改。
尝试了来自How to resolve "git did not exit cleanly (exit code 128)" error on TortoiseGit?的所有解决方案
【问题讨论】:
标签: git github ssh tortoisegit