将子存储库与 bitbucket 一起使用
我在尝试将子存储库推送到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如您发布的链接中所述,“您必须使子存储库成为主存储库的同级。”
因此,在 BitBucket 上,您需要以下结构:
然后是您的
.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:
Then your
.hgsub
insideagile.crm.framework
needs to contain the following:Logging = ../Logging
我要提出一个老问题,因为我认为我有更好的解决方案。我理解为什么 @the_drow 对原始接受的答案有问题,因为使用
Logging = ../Logging
您的本地计算机必须将 Logging 子存储库作为包含/主存储库的对等体。从组织的角度来看,这违背了子存储库的目的。但是,如果您使用子路径功能,您可以获得Mercurial 在推送时为您重写 URI:现在,我的
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:Now my local copy of the
my_subrepo
sub repository is stored insidemy_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.