GitLab 裸仓库导入

GitLab bare repository import

请帮助我如何将裸 git 存储库导入或推送到 GitLab。我是 Git & GitLab 的新手,所以详细的解释会很有帮助! 我使用的是 CentOS 和 GitLab CE 版本,版本 7.13.1。 非常感谢您的帮助:)

如果你有一个现有的 repo 想要导入到你的 GitLab CE 服务器,你可以按照:Import bare repositories into your GitLab instance

首先在服务器上复制回购协议:

sudo cp -r /old/git/foo.git /var/opt/gitlab/git-data/repositories/new_group/
# Do this once when you are done copying git repositories
sudo chown -R git:git /var/opt/gitlab/git-data/repositories/new_group/

然后就可以注册了(还是在GitLab服务器端):

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:import:repos RAILS_ENV=production

现在您可以clone it one any client as usual