baba yaga
baba yaga

Reputation: 119

GitLab bare repository import

Kindly help me in how to import or push a bare git repository to the GitLab. I'm kind of new to Git & GitLab , so a detailed explanation would be of great help ! I'm using CentOS and GitLab CE edition, version 7.13.1. Many Thanks for any help :)

Upvotes: 2

Views: 6437

Answers (1)

VonC
VonC

Reputation: 1324268

If you have an existing repo you want to import to your GitLab CE server, you can follow: Import bare repositories into your GitLab instance

The repo is first copied on the server:

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/

And then you can register it (still on the GitLab server side):

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

Now you can clone it one any client as usual.

Upvotes: 3

Related Questions