Gitlab导入:找不到文件

Gitlab导入:找不到文件,gitlab,Gitlab,我有一个带有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 不过,我只得到了错误“

我有一个带有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

不过,我只得到了错误“找不到文件”。我尝试了其他几种方法,也安装了Debians ruby,搜索了多个Google和StackOverflow结果,但我无法让它正常工作。

您应该首先将裸的回购放在repo目录中。总括的标准是
/var/opt/gitlab/git data/repositories/
。然后您只需运行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
sudo-u git-H cp-r my-project/.git/var/opt/gitlab/git-data/repositories//my-project.git
sudogitlab rake gitlab:import:repos
请参阅和


编辑:发送了一封邮件,将此信息包含在自述文件中。

我遇到了与“找不到文件”相同的问题。所以我搜索了Gemfile并尝试了几个文件夹。直到成功

该解决方案从源代码与Gitlab相关(或者在我的例子中,它在内部运行)

将您的.git裸存储库(或其中的几个)放入 “/var/opt/gitlab/git data/repositories//my project.git”

切换到用户“git”

如果您有正确的路径,请通过“耙”来尝试。如果不可用,请扩展路径:

export PATH=$PATH:/opt/gitlab/embedded/bin
在切换到shell之后,用于导入裸项目的rake命令将起作用并执行导入

cd /opt/gitlab/embedded/service/gitlab-rails/
bundle exec rake gitlab:import:repos RAILS_ENV=production
输出与此类似:

Processing raspberry/apollo-web.git
 * Created apollo-web (raspberry/apollo-web.git)
Processing raspberry/apollo-web.wiki.git
 * Skipping wiki repo
Processing dhbw/dhbw-prototyping-node-rest-course.git
...
编辑:
好吧,我高兴得有点太早了。虽然ouput说它是进口的。在Web GUI上没有新项目


我会进一步调查…

好吧,我高兴得有点太早了。虽然ouput说它是进口的。在Web GUI上没有新项目。我会进一步调查。。。
Processing raspberry/apollo-web.git
 * Created apollo-web (raspberry/apollo-web.git)
Processing raspberry/apollo-web.wiki.git
 * Skipping wiki repo
Processing dhbw/dhbw-prototyping-node-rest-course.git
...