I saw an older post with the same issue, but didn’t see the solution. Below you can see I can do the ssh test fine, but the moment I push it goes to user/password. I just added the config, but I’m not sure why it would be needed, as it has no problems with the test without it.
larry@/home/larry/git/configs%ssh -T git@gitlab.com
Welcome to GitLab, @larrys!
[3630 22-09-14 12:17]larry@/home/larry/git/configs%git push
Username for 'https://gitlab.com': ^C
larry@/home/larry/git/configs%ls ~/.ssh/
config heroku heroku.pub id_ed25519 id_ed25519.pub known_hosts
larry@/home/larry/git/configs%cat ~/.ssh/config
# gitlab account
Host <larrys.gitlab.com>
Hostname gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ed25519