the*_*row 5 mercurial bitbucket mercurial-subrepos
尝试将子存储库推送到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://the_drow@bitbucket.org/the_drow/agile.crm.framework
pushing subrepo Logging to https://the_drow@bitbucket.org/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
Run Code Online (Sandbox Code Playgroud)
我遇到过这个链接,描述了如何解决问题,但我不明白该怎么做.
我应该将我的Logging子存储库放入D:\Work\吗?
我应该怎么做mercurial子路径?这会让我在本地克隆吗?
编辑:根据要求,这是我的.hgsub文件的内容
Logging = Logging
Run Code Online (Sandbox Code Playgroud)
Tim*_*gan 13
正如您发布的链接中所述,"您必须将子存储库作为主存储库的兄弟姐妹."
所以在BitBucket上,您需要以下结构:
https://bitbucket.org/the_drow/agile.crm.framework
https://bitbucket.org/the_drow/Logging
Run Code Online (Sandbox Code Playgroud)
然后你的.hgsub内部agile.crm.framework需要包含以下内容:
Logging = ../Logging
我要提出一个老问题因为我认为我有更好的解决方案.我理解为什么@the_drow与原始接受的答案有问题,因为Logging = ../Logging您的本地计算机必须将Logging subrepo作为包含/ master repo的对等体.这种从组织的角度来看失败的目的.但是,如果使用子路径功能,则可以让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
Run Code Online (Sandbox Code Playgroud)
现在我的my_subrepo子存储库的本地副本my_project按预期存储在内部,但是当我推送到Bitbucket时,它被重新路由到真实的东西.实际上,由于Mercurial了解Git和SVN,因此您可以使用该重写功能指向任何位置.我有不止一些Bitbucket存储库,其他作者使用Github进行subrepos.