Skip to content

Unable to add deploy key: “Fingerprint has already been taken”

Summary

Trying to add a deploy key to another repository fails with “Fingerprint has already been taken”.

Steps to reproduce

  • On a Jenkins buildserver, generate an SSH key.
  • Add it to one project.
  • Try to add it to another project, watch it fail.

Using separate keys, one for each repository, is not an option, of course, as everyone knows that having multiple SSH private keys will eventually end up in “Too many authentication failures”, see also https://thomascannon.me/posts/fix-ssh-keys/ - the “fix” from there cannot be applied here though, as the connections go to the same user/server tuple (gitlab’s idiotic way of using only one Unix user, as opposed to FusionForge having one unix user per forge user).

What is the current bug behavior?

The deploy key is not added, and I have no way to access that project using the shared Jenkins build server.

What is the expected correct behavior?

The deploy key is added to the second repository as well.

Output of checks

I don’t have shell access to the server in question. If necessary, I can ask our admins to provide information.