Server Deploy key showing wrong user

Hi,

i have a repo on one of my servers called topconcours in the gitconfig the user is set to Omar Perez he is a direct member of the repo and set to owner.

i have replaced the deploy key for the repo with a new one just for the production server.

but when i do the ssh -T git@ test i get,

ssh -T git@gitlab.xxxxxxxxxxxx.com
Welcome to GitLab, @KevinR!

I am an owner on the repo also as im the owner of the gitlab group this repo is within. but why would it not be looking at the gitconfig.

when i run git config --list it states

user.email=omar.p@XXXXXXXXXXX.com
user.name=Omar Perez

remote.origin.url=git@gitlab.xxxxxxxxxxxxxx/topconcours.git

Hi @KevinR

why would ssh look what’s in .gitconfig? .gitconfig is not relevant to ssh. Only git uses it.

your right, SSH wouldnt look at .gitconfig

i should have added more to mu question.

the SSH key is new i generated it on the 29th Aug and added it straight to gitlab as a deploykey on this single repo.

which is why im puzzled as to why the SSH command is flagging as a old gitlab user which has been blocked (employee left) Theres no ssh config saying to connect to gitlab server using specific details or keys.

If there is no config ssh will take one of the default ~/.ssh/id_rsa, ~/.ssh/id_ecdsa or ~/.ssh/id_ed25519 private keys and authenticate using that. So it is possible the old deploy key is copied to the default private key. In order to try the new one you created you need to tell SSH to use it
ssh -T -i <path_to_new_key> git@gitlab.example.com