我将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
存储库的内容。