Can't push without user/password. ssh test works fine


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
Welcome to GitLab, @larrys!
[3630 22-09-14 12:17]larry@/home/larry/git/configs%git push
Username for '': ^C
larry@/home/larry/git/configs%ls ~/.ssh/
config  heroku  id_ed25519  known_hosts
larry@/home/larry/git/configs%cat ~/.ssh/config
# gitlab account
Host <>
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_ed25519

For that repo git is configured to use https (you can see the prompt for username mentions that), so it doesn’t really matter that ssh works.

I’ve never switched a repo from https to git, but I guess it something like git remote set-url origin<project_name> (but I have no idea if you can even operate on origin like that).

If you really want to use that ssh config snippet, you should probably use in the url, instead of just, but there’s very little point, and I have no idea if it will work.