Importing file:// based gits to gitlab


Can some one point me to the page or explain the workflow for importing a git repo that is usually cloned via:

git clone file:////path/to/repo.git

I have ssh access to the gitlab instance we use, if that helps.


To add some more information.

i have tried creating a project in our gitlab instance.
i have then gone to one of the projects, added a new origin, to that project on gitlab, but when i do a :
git push -u origin --all

i get his error:
Counting objects: 427, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (212/212), done.
Writing objects: 100% (427/427), 63.39 KiB | 0 bytes/s, done.
Total 427 (delta 168), reused 343 (delta 133)
remote: Resolving deltas: 100% (168/168), done.
remote: GitLab: You are not allowed to push code to protected branches on this project.
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘’


I figured this out in the end.
this was two seperate problems rolled into one.

Not under standing the permissions hierachy very well.
if your not an owner or master you cant be the first one to push into an empty repo.

second one, was that i needed to remove the previous remote, before adding a new remote.
once i did this and with the permissions everything worked.