Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I hg clone a git repository from BitBucket?

I am trying to use a BitBucket git repository, but I personally prefer using hg.

This works:

git clone https://[email protected]/projectuser/project.git

It prompts me for a password, then clones the repository as expected.

However, hg does not work:

hg clone https://[email protected]/projectuser/project.git

This gives me a 404 error.

I do have the hggit extension installed. If I first clone locally with git, I can then clone the git repository to an hg repository just fine - cloning off my local drive - and presumably I could push back from to the local hg repository to the local git repository.

I'd just prefer to pull/push directly with the bitbucket git repository from hg. Is there a way to do this?

like image 620
Mag Roader Avatar asked Jan 10 '15 23:01

Mag Roader


1 Answers

For access-protocols, which Mercurial's and Git's repositories can share (http/s/ + ssh), in order to uniquely identify remote side's type, special type of protocol used - git+real-protocol://

Sample for SSH-repo on GiHub (I just haven't https-URL in hands)

>hg clone git+ssh://[email protected]/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

compared to pure SSH-URL

>hg clone ssh://[email protected]/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!
like image 130
Lazy Badger Avatar answered Sep 30 '22 04:09

Lazy Badger