While trying to clone an already existing repository from gitlab into my local drive. I used the format
$ git clone https://github.com/libgit2/libgit2 mylibgit
For gitlab, you don't need to specify the user.
Replace it by an https url based on your GitLab account name.
cd /path/to/your/repo
git remote set-url origin https://gitlab.com//
git push -u origin master
Note:
trying to clone an already existing repository from gitla
This contradict "git clone https://github.com/libgit2/libgit2
", since this is a GitHub url, not a GitLab one.