我有一个带Debian Wheezy的测试虚拟机,没有安装ruby。已使用提供的安装程序安装了Gitlab 6.9.2,该安装程序带有嵌入式 ruby 。现在,我想将一些旧的仓库导入到Gitlab中,但是找不到正确的过程。我认为应该是这样的:

su - git
export PATH=$PATH:/opt/gitlab/embedded/bin
cd ~
bundle exec rake gitlab:import:repos RAILS_ENV=production

虽然,我仅收到错误“无法找到Gemfile”。我尝试了其他几种方法,也安装了Debians ruby​​,搜索了多个Google和StackOverflow结果,但是我无法使它正常工作。

最佳答案

您应该首先将仓库放置在仓库目录中。多功能的default path/var/opt/gitlab/git-data/repositories/<namespace>。然后,您只需运行rake任务:

sudo -u git -H cp -r my-project/.git /var/opt/gitlab/git-data/repositories/<namespace>/my-project.git
sudo gitlab-rake gitlab:import:repos

参见invoking rake tasksimport mechanism

编辑:发送MR upstream将此信息包含在自述文件中。

关于Gitlab导入: Could not locate Gemfile,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24240843/

10-16 13:47