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
  • #2500

Closed
Open
Created Jan 07, 2013 by Administrator@rootOwner

[3.1 => 4.0] Error in namespaceify script / rename repos?

Created by: 2called-chaos

Hey guys,

I've updated my Gitlab installation yesterday but had to fiddle around a lot. There are two problems whereas one is more sort of a feature request. I described the problem on Google groups but I will quote it here anyways.

Bug: The rake task "gitlab:enable_namespaces" seems to miss to delete the old repo from gitolite which results in gitolite creates new empty repositories. This is not a major problem as they are just polluting the disk rather than doing anything else.

My suggested solution (more a workaround than a solution):

Gitlab::Gitolite.new.config.apply do |c|
  c.conf.rm_repo("some_project")
  c.conf.rm_repo("some_other_project")
  c.conf.rm_repo("do_NOT_add_a.git") # important!
end

Also I was wondering why you can do a "danger" move or rename a namespace but not the repository name itself (as in the linked discussion there is a need for this especially after the newly introduced namespaces). I've found a workaround for this too but is there no easy way of adding this directly into the GUI as "dangerous action"?

Step 1: Move the repository via GUI in a namespace if not already happened (I don't know if there is the same bug as in the update script mentioned above)

Step 2: Database Rename the repository path in the database (column: path) and remember the ID column value.

Step 3: Move repository Move resp. rename the repository directory to its corresponding destination

Step 4: Apply gitolite permissions Open up an IRB console and replace the values before running the following (do not add the .git extension!):

Gitlab::Gitolite.new.move_repository "namespace/old_repository_name", Project.find(<REMEMBERED ID>)

Step 5: Create satellites Run the following command in your gitlab installation directory (as gitlab user):

bundle exec rake gitlab:satellites:create RAILS_ENV=production

Regards,

Chaos

Assignee
Assign to
Time tracking