In my repo tree on my VM:
cat .git/config
You can see the remote URL in there. It should look like: url = https://user@bitbucket.org/user/repository.git
or url = https://gitlab.com/user/repository.git
Run:
git remote set-url origin git@gitlab.com:user/repository.git
Gitlab uses the git@gitlab.com
convention and will use any public SSH keys you have added there.