Imported project from GitHub always created in personal namesapace


When importing a project from GitHub into a self-hosted GitLab CE 10.0.2 instance I am able to select the namespace (group) where the project shall be imported to in GitLab (screen shot here:

However, whatever I select there, the project is always imported into my personal namespace. This could prove annoying when trying to import several hundred repositories and needing to move them one by one afterwards.

Anyone else experiencing this?


Can’t help you about importing to non-personal namespace but I’m using a script to move projects to a different group after the import.
Using the API below.
POST /groups/:id/projects/:project_id

To use this API, I’ll need to know the project ids of new projects. I’m looking at created_date attribute from making API call to get a list of projects. This of course implies I can’t be adding projects doing this operation.

I haven’t tried this but it may be able to import a project using Create Project API and specifying “import_url”

Hi @hozawa, thanks for the input. Actually a good idea to use the API.

I tried both, importing a GitHub repo when creating a new GitLab repo over the API and creating the GitLab repo over the import wizard and then moving over the API.

Creating a repo over the API and setting the import URL works, however, you will only get the GIT part of the repo and not all the GitHub parts (pull requests, for example). So this is not a workable solution for me.

Importing over the wizard will give you all the GIT and GitHub parts. Moving over the API works well. You do not even need IDs of the group or project you can just use paths and names. e.g:

curl --header "PRIVATE-TOKEN: <token>" -X POST "<group name>/projects/<user name>%2F<project name>"
1 Like