I tried to push to remote repository to gitlab, I got error message like below.
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I already share public key to gitlab and I made a repository to push.
I think it might indicate that I have problem ssh connection. However, I've done ssh connection configuration correctly.
Actually, I did connection test(ssh -T gitlab
) then I got successful message
Welcome to GitLab, @MYUSERNAME!
And I write config in ~/.ssh/config
like
Host gitlab
Hostname gitlab.com
User git
IdentityFile ~/.ssh/conf.d/personal/id_ed25519_gitlab
I read official document about ssh connection.
And I tried to remake my key and reflect that config to gitlab. It seems to work when connection testing, but not to work when pushing to remote repository.
I cannot handle this problem at all, please help about this.