6

I would like to configure my Mercurial project to be able to push it into gitHub repository.

While using command:

hg push git+ssh://git@github.com/myusername/myproject.git

I receive a msg:

abort: repository git+ssh://git@github.com/myusername/myproject.git not found!

I already check and establish SSH connection, and it looks ok:

Hi myusername! You've successfully authenticated, but GitHub does not provide shell access.

my respository url copied from github (it's a fork from other open-source project): https://github.com/myusername/myproject.git

What else I should check? Why I have an information that it doesn't exist while, in fact, it does? Where can be a problem?

Malvinka
  • 1,185
  • 1
  • 15
  • 36

3 Answers3

4

Thanks to rfkortekaas I found a problem with hg-git setup.

In ~/.hgrc there has to be:

[extensions]

hgext.bookmarks =

hggit =

Malvinka
  • 1,185
  • 1
  • 15
  • 36
2

Are you sure that you have enabled and setup the hg-git extension correctly. This error also appears if the extension is not correctly setup.

Can you try it with a local git repository to phase-out github as a possible error.

rfkortekaas
  • 6,049
  • 2
  • 27
  • 34
  • That is possible that the setup is a problem. I am very new about mercurial. What do you mean by "phase-out github"? And how can I check hg-git setup? – Malvinka Mar 17 '15 at 19:44
  • create somewhere a temporary git repository (git init) and push to the local git repository. – rfkortekaas Mar 17 '15 at 20:17
  • 1
    If you get that error it means it isn't setup correctly. See http://hg-git.github.io/ under installation for instructions. – rfkortekaas Mar 21 '15 at 15:52
1

I'm not sure you can push in Git if you didn't clone your repository from a Git one before using hg-git. It seems me that hg-git manages a .git locally.

aflp91
  • 641
  • 5
  • 12
  • You mean I cannot use existing mercurial project? But only use hg-git pull from git-hub and then work? I'll try this, thanks. – Malvinka Mar 17 '15 at 08:59