rake Import task does not support file system project
Created by: Jazznight
I have a lot of git repositories need import to gitlab.
So, I just install gitlab at existing git server (reps path is under /gitroot). I have also set repos_path: "/gitroot" @ gitlab-shell/config.yml
After execute import command: run bundle exec rake gitlab:import:repos RAILS_ENV=production
I found rake import task doesn't allow non-htttp link.
I have checked bellow relate code:
app/contexts/projects/create_context.rb => @project.import_url alwasy doesn't have any value => @project.valid? will check validation only (http and https)
if @project.valid? && @project.import_url.present?
shell = Gitlab::Shell.new
if shell.import_repository(@project.path_with_namespace, @project.import_url)
# We should create satellite for imported repo
@project.satellite.create unless @project.satellite.exists?
true
else
@project.errors.add(:import_url, 'cannot clone repo')
end
end