gpt4 book ai didi

git - 我可以 hg 从 BitBucket 克隆一个 git 存储库吗?

转载 作者:太空狗 更新时间:2023-10-29 12:54:43 24 4
gpt4 key购买 nike

我正在尝试使用 BitBucket git 存储库,但我个人更喜欢使用 hg。

这个有效:

git clone https://myuser@bitbucket.org/projectuser/project.git

它提示我输入密码,然后按预期克隆存储库。

但是,hg 不起作用:

hg 克隆 https://myuser@bitbucket.org/projectuser/project.git

这给了我一个 404 错误。

我确实安装了 hggit 扩展。如果我首先使用 git 在本地克隆,然后我可以很好地将 git 存储库克隆到 hg 存储库 - 克隆我的本地驱动器 - 并且大概我可以从本地 hg 存储库推回到本地 git 存储库。

我只是更喜欢直接使用来自 hg 的 bitbucket git 存储库 pull/推。有办法做到这一点吗?

最佳答案

对于访问协议(protocol),Mercurial 和 Git 的存储库可以共享 (http/s/+ ssh),为了唯一标识远程端的类型,使用特殊类型的协议(protocol) - git+real-protocol://

GiHub 上的 SSH-repo 示例(我手头没有 https-URL)

>hg clone git+ssh://git@github.com/lazybadger/Fiver-l10n.git
destination directory: Fiver-l10n
importing git objects into hg
updating to branch default
19 files updated, 0 files merged, 0 files removed, 0 files unresolved

与纯 SSH-URL 相比

>hg clone ssh://git@github.com/lazybadger/Fiver-l10n.git Fiver-SSH
remote: Invalid command: 'hg -R lazybadger/Fiver-l10n.git serve --stdio'
remote: You appear to be using ssh to clone a git:// URL.
remote: Make sure your core.gitProxy config option and the
remote: GIT_PROXY_COMMAND environment variable are NOT set.
abort: no suitable response from remote hg!

关于git - 我可以 hg 从 BitBucket 克隆一个 git 存储库吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27882358/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com