Generate authentication code for accessing Mercurial

713 Views Asked by At

I'm installing a Mercurial server for managing source code and found RhodeCode. It's quite good for me. However, I'd like to have a feature which is similar to Google Code, in which a user can generate an authentication code for accessing source control from Mercurial client. Is there any other Mercurial server can do that or is there any built-in feature of RhodeCode that I didn't know?

Thanks

2

There are 2 best solutions below

0
On BEST ANSWER

No, that feature doesn't exist currently: neither RhodeCode/Kallithea nor hgweb supports it.

The closest to this is probably RhodeCode and Kallithea's support for an API key. The key is private for a given user, but using the key it's possible to trigger events in RhodeCode from scripts. It wont let you run

hg clone http://hg.server/foo?key=123

so it's not exactly what you want. I'm sure Kallithea could be extended to do it, though, as can hgweb.

0
On

In RhodeCode 3.0 series there's a new authentication mechanism called auth_tokens. It allows users to use it exactly how it works in google code. Just enable auth_tokens in the authentication plugins, and then users can generate special tokens with VCS role in the web interface. This will allow to access RhodeCode repositories with this token.

Tokens can have expiry dates and can be revoked at any time.