kamal
kamal

Reputation: 9785

how to setup a local repo of mercurial

here is the complete scenario:

  1. Main repository: http://10.0.1.8:8000/ptest
  2. I clone it at host 10.1.0.115, in the folder /LOCAL-REPO
  3. Then, publish it using the command hg serve -p 9900 -d --webdir-conf hgwebconfig with the hgwebconfig file having

    [paths]
    ptest = /LOCAL_REPO/ptest
    [web]
    style = gitweb
    

now, on the same host 10.0.1.115, i create a seperate folder /QA and do:

hg clone http://10.0.1.115:9900/ptest

and get all the files, now i want to make changes and push them to the repo on http://10.0.1.115:9900/ptest using the command

hg push ssh://10.0.1.115//??/ptest

I don't know what the correct value would be for ??. So the questions are:

  1. How do i setup a user/password to push changes to this repo on 10.0.1.115?
  2. what is the corect syntax in this case?

When I try to push the changes I get error:

hg push ssh://[email protected]/ptest
[email protected]'s password: 
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!

Upvotes: 1

Views: 1803

Answers (1)

rombarcz
rombarcz

Reputation: 1614

Do you really need to push via ssh:// when you pulled via http:// ?

After hg clone http://10.0.1.115:9900/ptest clone you should be able to push it via http as well, like hg push http://10.0.1.115:9900/ptest

But if you really need to push via ssh here it is: you must have your repository accessible under local account, e.g. if user is hg and it's homedir is /home/hg and you will have your repo in /home/hg/repository directory then you will be able to access it via command:

hg push ssh://[email protected]/repository/

User/password will be same as to ssh onto user hg.

Upvotes: 3

Related Questions