Git取回上游不允许我的公钥在windows上



我将git4windows连接到我的github帐户,并将我的密钥添加到我的帐户。我还在.ssh文件夹中看到一个新密钥。我也可以从webstorm推送到我的github上。

然而,我想重新建立我分叉的上游分支,所以我这样做:

http://robots.thoughtbot.com/keeping-a-github-fork-updated

然而当我尝试

git fetch upstream

A:foo>git fetch upstream                                      
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

在我的Linux机器上找到了完全相同的方法。什么好主意吗?

git remote -v                  
origin  https://github.com/foo/bar.git (fetch)
origin  https://github.com/foo/bar.git (push)
upstream        git@github.com:you/bar.git (fetch)
upstream        git@github.com:you/bar.git (push)

看起来您的存储库命名为foo/bar,而上游存储库命名为you/bar

如果您是foo但不是you,则需要you才能访问bar存储库。

您可能需要使用https而不是SSH来获取upstream存储库的内容。

最新更新