1

When you add mercurial subrepositiories using .hgsub you can specify them using HTTPS or SSH but here is the big problem:

  • if you specify HTTPS you will not be able to push because it will require you to login.
  • if you specify SSH, you will be able to push but others will not be able to even checkout your repository.

Is there a workaorund for this?

sorin
  • 161,544
  • 178
  • 535
  • 806

1 Answers1

2

Sure, either of those types of URLs work just fine, and the ways to configure correctly to avoid them are on the PublishingRepositories page.

For the HTTPS case you use the auth section of your hgrc to provide the password.

For the SSH case you just need to use good old unix permissions to make sure that files created and written by that ssh user on the remote host have a group like 'dev' and are writeable by any other users in that group. Something like this as root on the server side should do it:

chgrp -R developers /path/to/repo
chmod -R g+rwX /path/to/repo
find /path/to/repo -type d | xargs chmod g+s 

You only need to do that once, but it's more of a ServerFault sort of topic.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169