Not strictly related to the current scenario. Sometimes when you are prompted for password, it is because you added the wrong* origin format (HTTPS instead of SSH)
HTTP(S) protocol is commonly used for public repos with strong username+pass
SSH authentication is more common for internal projects where you can authenticate with a ssh-key-file and simple pass-phrase
GitLab users are more likely to use the SSH protocol
View your remote info with
git remote -v
If you see HTTP(S) address, this is the command to change it to SSH:
git remote set-url origin git@gitlab.my_domain.com/example-project.git