User public key strangely maps to anonymous

We have a user account that has worked fine until recently. He could do git commands from his laptop using his ssh keypair.

But now he has no permissions to access any project. When he tries to connect from the commandline using ssh he gets the welcome:

Welcome to GitLab, Anonymous!

We can’t find anything unusual in the settings of that user.
Adding new public keys to his account doesn’t help.

Any idea how we can fix this?

Hi - We’ve just experienced this (or something very similar)

Steps to Reproduce:

  1. Create a Project
  2. Add a Deploy Key to the project
  3. Do some commits
  4. Delete the Project
  5. Create the project again (with the same name - probably doesn’t matter that it’s the same name, but this is what we did)
  6. Add the Original Deploy Key to the recreated project
  7. Try to fetch the new repo using the deploy key - FAIL
  8. Add a completely new Deploy Key to the recreated project
  9. Try to fetch the new repo using the new deploy key - SUCCESS

We believe the issue is something along the lines of: once a key is ‘orphaned’ from all projects as far as gitlab is concerned, you are unable to re-add that key to any project going forward

We don’t think that this is the correct behaviour!