Linux找不到gitlab-rake?

3

我试图备份Git。我找到了这个脚本(在这里:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md
但是,如果我使用这个命令,它会说命令未找到。我做错了什么?

root@gitlab-test git/gitlab# sudo gitlab-rake gitlab:backup:create SKIP=db,uploads                                                                                                            
    sudo: gitlab-rake: command not found

我也尝试了以下命令:

sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

但是此命令在upload.rb处停止,并显示Errno::ENOENT: No such file or directory

1个回答

3

这取决于gitlab的安装位置。
例如:

PATH=$PATH:/opt/gitlab/bin
export PATH

检查 /opt/gitlab/bin 中是否有 gitlab-rake

在 /usr/bin 中应该有符号链接
如果没有,可能是您从源代码安装了GitLab (sudo -u git -H bundle exec rake)。


可能是符号链接问题:https://gitlab.com/gitlab-org/gitlab-ce/issues/899#note_2558643 - VonC

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接