I so have several mercurial servers and people are pushing changes using a single user hg
and using, only, ssh public key authentication, each of them having it's own key.
How can I configure the server so it will pick the username for push based on the public key being used?
Is it possible? If not, why and what alternatives so I do not have to configure the username in .hgrc
on each account * machine where I connect to.
Also, think about other use case: you have an hg repository cloned by root on a machine and two different people are connecting this machine (as root), making changes and trying to commit and push the changes.
These two are using the same account but they are connected using different ssh keys, so you would want to see who did this. Currently these will appear as the user configured in .hgrc