Can't push from git to gitlab via SSH (asks for password)?

,

This is the thing that worked for me. I’m on openSUSE Leap 15.5 (both server and client).

Hey there,

i had some other solution, dont know why, but i have this git gui and there is under “help” some public key… maybe you try this to add in gitlab.
image

i tried so much… adding keys, deleting keys
and tried with
eval $(ssh-agent -s)
ssh-add
→ nothing works for more until next startup… but the solution on top, works for me… maybe someone helps :slight_smile:

If somebody comes here from Google as I did, problem in my case was much sillier, than options listed above.

  1. I have set origin https://gitlab.com/atollye19/numbers.git (fetch)
  2. I haven’t configured a token to push over https
  3. So by git push -u origin main I tried to push over https with no token

So I changed origin address to ssh-type address git@gitlab.com:atollye19/numbers.git and it worked

I think this might happen if your repository is private in the server.