我有一个github存储库,就像 https://github.com/username/reponame
我还在设置中将我的 SSH 密钥添加到存储库中。
用:
git remote -v
我得到:
reponame git@github.com:username/reponame.git (fetch)
reponame git@github.com:username/reponame.git (push)
我已经在 Github 上的存储库根中做了一个test.txt
来测试获取。
在本地项目文件夹中的 Windows CMD 中使用 git 命令(之前从存储库手动复制(,
git fetch reponame
我得到:
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Connection abandoned.
fatal: Could not read from remote repository.
我发现了同样的问题,但没有一个能为我清除图片。
任何建议我在这里错过了什么?
我不知道为什么,但是更改为HTTPS而不是SSH访问已经奏效。
git remote rm reponame
git remote add reponame https://github.com/username/reponame.git