gitblit icon indicating copy to clipboard operation
gitblit copied to clipboard

(feature) Allow generic username "git" for key-based authentication

Open gitblit opened this issue 10 years ago • 1 comments

Originally reported on Google Code with ID 608

Most ssh-based git servers allows public key authentication with a generic username
"git". The actual user is determined by his public key. This gives the opportunity
to use the same git url on many places (e.g. in maven poms as scm location).

How it works:

- the system ensures that a certain ssh key can only be used once
- when a user "git" tries to authenticate, only ssh public key authentication is allowed
- the public key manager is searched for the given key. if it's found, the correct
user will be returned
- For users who have a public key added to their account, the ssh clone uri is shown
as git@... rather than username@... - this could also be shown as extra clone uri

Reported by michael.wyraz on 2015-07-29 18:26:33

gitblit avatar Aug 12 '15 12:08 gitblit

After some deeper look at the code I think that most of the reqired implementation can
be done with some small changes to CachingPublicKeyAuthenticator (any maybe authManager
to find a user by it's public key).

Reported by michael.wyraz on 2015-07-29 18:43:37

gitblit avatar Aug 12 '15 12:08 gitblit