将子存储库与 bitbucket 一起使用

发布于 2024-11-06 17:09:29 字数 1500 浏览 4 评论 0原文

我在尝试将子存储库推送到 bitbucket 时遇到此错误:

D:\Work\agile.crm.framework>hg push
warning: bitbucket.org certificate with fingerprint 81:2b:08:90:dc:d3:71:ee:e0:7
c:b4:75:ce:9b:6c:48:94:56:a1:fe not verified (check hostfingerprints or web.cace
rts config setting)
http authorization required
realm: Bitbucket.org HTTP
user: the_drow
password:
warning: bitbucket.org certificate with fingerprint 81:2b:08:90:dc:d3:71:ee:e0:7
c:b4:75:ce:9b:6c:48:94:56:a1:fe not verified (check hostfingerprints or web.cace
rts config setting)
pushing to https://[email protected]/the_drow/agile.crm.framework
pushing subrepo Logging to https://[email protected]/the_drow/agile.crm.fra
mework/Logging
warning: bitbucket.org certificate with fingerprint 81:2b:08:90:dc:d3:71:ee:e0:7
c:b4:75:ce:9b:6c:48:94:56:a1:fe not verified (check hostfingerprints or web.cace
rts config setting)
abort: HTTP Error 404: NOT FOUND

我遇到了这个 链接描述了如何解决问题,但我不明白该怎么做。
我应该将我的 Logging 子存储库放在 D:\Work\ 中吗?
我到底应该如何处理善变的子路径?这能让我在本地克隆吗?

编辑: 根据要求,这是我的 .hgsub 文件的内容

Logging = Logging

I have encountered this error when trying to push a subrepository to bitbucket:

D:\Work\agile.crm.framework>hg push
warning: bitbucket.org certificate with fingerprint 81:2b:08:90:dc:d3:71:ee:e0:7
c:b4:75:ce:9b:6c:48:94:56:a1:fe not verified (check hostfingerprints or web.cace
rts config setting)
http authorization required
realm: Bitbucket.org HTTP
user: the_drow
password:
warning: bitbucket.org certificate with fingerprint 81:2b:08:90:dc:d3:71:ee:e0:7
c:b4:75:ce:9b:6c:48:94:56:a1:fe not verified (check hostfingerprints or web.cace
rts config setting)
pushing to https://[email protected]/the_drow/agile.crm.framework
pushing subrepo Logging to https://[email protected]/the_drow/agile.crm.fra
mework/Logging
warning: bitbucket.org certificate with fingerprint 81:2b:08:90:dc:d3:71:ee:e0:7
c:b4:75:ce:9b:6c:48:94:56:a1:fe not verified (check hostfingerprints or web.cace
rts config setting)
abort: HTTP Error 404: NOT FOUND

I have encountered this link that describes how to solve the problem but I don't understand what to do.
Should I place my Logging subrepository in D:\Work\?
What exactly should I do with the mercurial subpaths? Will this enable me to clone locally?

EDIT:
As requested, here are the contents of my .hgsub file

Logging = Logging

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深陷 2024-11-13 17:09:29

正如您发布的链接中所述,“您必须使子存储库成为主存储库的同级。”

因此,在 BitBucket 上,您需要以下结构:

https://bitbucket.org/the_drow/agile.crm.framework
https://bitbucket.org/the_drow/Logging

然后是您的 .hgsubagile.crm.framework 内的 code> 需要包含以下内容:

Logging = ../Logging

As noted in the link that you posted, "You have to make the subrepositories as siblings of the main repository."

So on BitBucket, you need the following structure:

https://bitbucket.org/the_drow/agile.crm.framework
https://bitbucket.org/the_drow/Logging

Then your .hgsub inside agile.crm.framework needs to contain the following:

Logging = ../Logging

腻橙味 2024-11-13 17:09:29

我要提出一个老问题,因为我认为我有更好的解决方案。我理解为什么 @the_drow 对原始接受的答案有问题,因为使用 Logging = ../Logging 您的本地计算机必须将 Logging 子存储库作为包含/主存储库的对等体。从组织的角度来看,这违背了子存储库的目的。但是,如果您使用子路径功能,您可以获得Mercurial 在推送时为您重写 URI:

external/my_subrepo = external/my_subrepo

[subpaths]
([https://|ssh://hg@])bitbucket\.org/moswald/my_project/external/my_subrepo = \1bitbucket.org/moswald/my_subrepo

现在,我的 my_subrepo 子存储库的本地副本按预期存储在 my_project 中,但是当我推送到 Bitbucket 时,它会重新路由到真实的事情。事实上,您可以使用重写功能指向几乎任何地方,因为 Mercurial 可以理解 Git 和 SVN。我有多个 Bitbucket 存储库,其中包含使用 Github 的其他作者的子存储库。

I'm going to bump an old question because I think I have a better solution. I understand why @the_drow has issues with the original accepted answer since with Logging = ../Logging your local machine has to have the Logging subrepo as a peer with the containing/master repo. This kind of defeats the purpose of subrepos from an organization point of view. However, if you use the subpaths feature, you can get Mercurial to rewrite the URI for you on push:

external/my_subrepo = external/my_subrepo

[subpaths]
([https://|ssh://hg@])bitbucket\.org/moswald/my_project/external/my_subrepo = \1bitbucket.org/moswald/my_subrepo

Now my local copy of the my_subrepo sub repository is stored inside my_project as expected, but when I push to Bitbucket, it's rerouted to the real thing. In fact, you can use that rewriting feature to point pretty much anywhere since Mercurial understands Git and SVN. I've got more than a few Bitbucket repositories that have subrepos by other authors who use Github.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文