Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab bare repository import

Tags:

git

gitlab

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 :)

like image 414
baba yaga Avatar asked Jun 10 '26 23:06

baba yaga


1 Answers

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.

like image 96
VonC Avatar answered Jun 12 '26 12:06

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!