Repository not found?

I’m trying to access gitlab with my ssh key pair. It rejected my key stating that the fingerprint is taken. I deleted that ssh key from my other account. But it still doesn’t accept it and deny it with “fingerprint is taken”.
I created another ssh key pair (I’m kind of forced to do that) and then I used that key in my ~/.ssh/config file. I still can’t clone or pull the repositories with that key???
I tried with https too, that access also fails. Apparently something wrong. I’m 100% sure I’m using the right key pair on the ssh config file. Such a simple thing became an issue and I don’t want to create another key pair for gitlab. I want to use my primary ssh key for gitlab access. (Again, I deleted that key from my previous account)

This is weird, below works!

ssh-agent bash -c 'ssh-add ~/.ssh/my_new_key; git pull'

but with below ssh config file

  Preferredauthentications publickey
  User git
  IdentityFile ~/.ssh/my_new_key

access fails with

remote: ========================================================================
remote: The project you were looking for could not be found.
remote: ========================================================================
fatal: Could not read from remote repository.

??? Not sure what am I missing here?


	sshCommand = ssh -i ~/.ssh/my_new_key -F /dev/null

in the [core] section of git config file seems to solve the problem. (Not sure why it has to run every time but it’s okay!)
Now back to original problem, how do I still use my original key pair? I wrote above that I deleted that key from my earliest gitlab account but I still get the “fingerprint taken” error… Have l lost an account to dementia?

Probably you used the same key in the same gitlab instance in some other context. Perhaps you have another account. Perhaps you added it as a deploy key. It’s something like that.

It’s easy to forget that there is no user associated with a ssh key. Everyone uses the same ssh user, so only the key fingerprint is used to distinguish. Therefore the same person (you) cannot use the same key in different contexts.