where can i find gitlab-ctl ?
Hello,
i actually want to import repositories from another gitlab instance into my docker-gitlab instance.
As far as i read i have to do a bunch of "gitlab-ctl" calls (http://stackoverflow.com/questions/19902417/change-the-data-directory-gitlab-to-store-repos-elsewhere) but I cannot find gitlab-ctl in the docker container.
Do I have to install it additionally ?
Kind regards,
Lars
This image is built from GitLab sources. gitlab-ctl is part of the the
omnibus packages and as such is not available in here.
On Friday 05 February 2016 06:33 PM, lgersman wrote:
Hello,
i actually want to import repositories from another gitlab instance into my docker-gitlab instance
As far as i read i have to do a bunch of "gitlab-ctl" calls (http://stackoverflowcom/questions/19902417/change-the-data-directory-gitlab-to-store-repos-elsewhere) but I cannot find gitlab-ctl in the docker container
Do I have to install it additionally ?
Kind regards,
Lars
— Reply to this email directly or view it on GitHub https://github.com/sameersbn/docker-gitlab/issues/595.
Sameer Naik
w: http://www.damagehead.com e: [email protected]
Hi @lgersman
Had the same problem a while back. There are actually many ways to import repositories.
- Import by the web interface (one by one) from many 3rd parties hosting repo.
- Import by file system (batch import of many repositories) <= I guess this is what you are looking for ?
- Sync repo (mirroring is available in EE version only but you can manage it with scripts, although it would be wise to really know
gitinternals before going on such a journey).
Assuming that you want to batch-import many repos.
The fatest and simplest way is to copy the bare repos to the gitlab volume. I'll explained, the default config of the docker-compose.yml places GitLab repos in /srv/docker/gitlab/gitlab/repositories on the host, they are in /home/git/data inside the container.
Copy all those bare repos (by rsync or scp, rsync is faster) to that folder on the host.
Before you run the next command, make sure the DB container (postgres by default) and the redis container are running
Then you need to import them into GitLab by running a rake command
docker run --name gitlab -it --rm \
--link redis:NAME_OF_REDIS_CONTAINER \
--link postgresql:NAME_OF_POSTGRES_CONTAINER \
--e "GITLAB_SECRETS_DB_KEY_BASE=dslkjfskjdfwlekjflskdjflskdjfalskdhflaksdjagjdl"
-v "/srv/docker/gitlab/gitlab:/home/git/data"
[OTHER OPTIONS] \
sameersbn/gitlab:8.4.3 app:rake gitlab:import:repos
Watch the logs and your repos should be available into your new gitlab container.
Any command you want to try you can do with rake, I am not sure but for me I never needed more.
See https://github.com/sameersbn/docker-gitlab#rake-tasks
whoops! I didn't even realize @lgersman was trying to import repos :stuck_out_tongue: information provided by @veggiemonk is spot on.
@sameersbn a quick PR is coming. Many people got stuck at this first step. (sigh) legacy... ;-)
PR is #597
Great support - thank you both !!! On Feb 5, 2016 7:38 PM, "Julien Bisconti" [email protected] wrote:
PR is #597 https://github.com/sameersbn/docker-gitlab/pull/597
— Reply to this email directly or view it on GitHub https://github.com/sameersbn/docker-gitlab/issues/595#issuecomment-180491936 .
if you're looking for gitlab-ctl or gitlab-rails in order to reset your root password (like i was), try ( https://github.com/sameersbn/docker-gitlab/issues/916#issuecomment-395078678 ):
docker exec -it GITLAB_CONTAINER_ID /bin/bashsu - gitcd gitlabbundle exec rails c productionuser = User.where(id: 1).firstuser.password = 'NEW_PASS'user.password_confirmation = 'NEW_PASS'user.saveexit