“无法为当前打开的存储库找到任何相关的存储库主机” [英] "Could not find any relevant repository hosts for the currently open repository"

查看:303
本文介绍了“无法为当前打开的存储库找到任何相关的存储库主机”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为nuget git存储库创建一个pull请求(我刚刚从中做了一个克隆)。我做了一个本地提交。



但是,当我尝试创建请求时,出现以下错误:


无法为当前打开的存储库找到任何相关的存储库主机


这是什么意思,我该如何解决它?我必须换叉而不是克隆吗?如果是这样,现在应该怎么做,我已经对克隆进行了更改?

解决方案

一个拉请求,尤其是在GitHub上,假设你有 首先分配了一个GitHub仓库 ,然后克隆那个分支。



当然,这意味着你不能直接推回到你首先克隆的回购仓库,因为你不是 合作者 该回购(或您不拥有该回购)。

但是,如果您想要执行拉取请求,则假定您无法直接向上游回购提供回报。如果可以的话,不需要拉取请求。



结果 OP jgauffin 正在使用 CodePlex ,但其机制与<一个href =http://codeplex.codeplex.com/wikipage?title=Forks =nofollow noreferrer> CodePlex forks 。



如果你有一个克隆,你可以通过它来引用分支:


  • 将源重命名为上游 git remote rename origin upstream

  • 将源文件添加到 git remote add origin url / to / your / fork



请参阅 原点上游在github




I'm trying to create a pull request for the nuget git repository (which I just did a clone from). I've made a local commit.

But when I try to create the pull request I get the following error:

Could not find any relevant repository hosts for the currently open repository

What does that mean, and how do I fix it? Do I have to fork instead of cloning? If so, what should I do now that I've made changes to the clone?

解决方案

A pull request, especially on GitHub, supposed that you have forked a GitHub repo first, and then clone that fork.

That means, of course, that you could not directly pushed back to the repo you have cloned in the first place, because you are not a collaborator for that repo (or you don't own that repo).
But if you want to do a pull request, it is assumed that you cannot contribute directly to the upstream repo. If you could, no pull request would be necessary.

It turns out the OP jgauffin is working with CodePlex, but the mechanism is the same for CodePlex forks.

If you have a clone, you can make it reference the fork by:

See "What is the difference between origin and upstream in github"

这篇关于“无法为当前打开的存储库找到任何相关的存储库主机”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆