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 git@gitlab.com:mygroup/myrepo.git'
but with below ssh config file
Host gitlab.com
Hostname gitlab.com
Preferredauthentications publickey
User git
IdentityFile ~/.ssh/my_new_key
access fails with
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
??? Not sure what am I missing here?