Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #3992

Closed
Open
Created May 19, 2013 by Administrator@rootOwner

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
Assignee
Assign to
Time tracking