Deploy key: same key, different comment -> different hash -> duplicate key unusable
Created by: klamontagne
If a user sets a deploy key for his project: ex.:
ssh-rsa AAAAB3NzaC1[...]EQ== www-data@myproject.com
and another user sets the same public key as deploy key for another project, but for some reason, with another comment field at the end:
ssh-rsa AAAAB3NzaC1[...]EQ== myproject.com Apache User
Gitlab doesn't realise and gives a different identifer to the keys, probably because it uses a hash of the full text instead of just the key part. When the key is added in gitolite, for example using the gitlab:app:update_keys rake task, it gives out a warning of the form:
WARNING: keydir/deploy_[...].pub duplicates keydir/deploy_[...].pub, sshd will ignore it
and the duplicated key is not usable with gitolite.