Adding a deploy key results in "Key has already been taken"
Created by: ruimarinho
It looks like the new 5.0 version changes the way deploy keys work. Previously, deploy keys could be added for each project but now adding the same key to a different project results in a Key has already been taken.
To workaround this issue, you can set project_id
to null
on the keys
table works (see to https://github.com/gitlabhq/gitlabhq/blob/master/app/models/key.rb#L60).
API call GET /api/v3/internal/allowed?key_id=xxx&action=git-upload-pack&ref=_any&project=xxxxx
will work again.