klowner / docker-gitlab-mirrors Goto Github PK
View Code? Open in Web Editor NEWMirror git/svn/hg/bzr to gitlab inside Docker
License: MIT License
Mirror git/svn/hg/bzr to gitlab inside Docker
License: MIT License
when I add mirror ,meet this error, please help, thanks.
docker-compose run --rm gitlab-mirrors add --git --project-name Test --mirror [email protected]:/Test/test.git
Resolving gitlab remote.
Creating new project Test
Traceback (most recent call last):
File "lib/manage_gitlab_project.py", line 105, in
found_project=createproject(project_name)
File "lib/manage_gitlab_project.py", line 78, in createproject
git.add_project(pname,description=description,**project_options)
File "build/bdist.linux-x86_64/egg/gitlab3/init.py", line 184, in fn
File "build/bdist.linux-x86_64/egg/gitlab3/init.py", line 418, in _post
File "build/bdist.linux-x86_64/egg/gitlab3/init.py", line 435, in _request
File "build/bdist.linux-x86_64/egg/gitlab3/init.py", line 411, in _check_status_code
gitlab3.exceptions.MissingRequiredAttribute: URL: http://git.domain.cn/api/v3/projects, Data: {'wall_enabled': 'false', 'namespace_id': '4', 'snippets_enabled': 'false', 'merge_requests_enabled': 'false', 'name': 'Test', 'issues_enabled': 'false', 'wiki_enabled': 'false', 'public': 'false', 'description': 'Mirror of [email protected]:/Test/test.git'}
There was an unknown issue with manage_gitlab_project.py
I'm trying mirror project from remote gitlab to local gitlab
remote gitlab verson:8.8.5
local gitlab verson:8.8.5
Hi,
I'm new to docker and I'm trying to use this.
I tried this command with docke 1.7.1
[root@vagrant gitlab]# docker run --rm -it \
-v ${PWD}:/config:/config \
quay.io/klowner/gitlab-mirrors:latest \
run ssh git.example.com
and got "Error response from daemon: invalid mode for volumes-from: /config"
I checked docker engine docs and it really doesn't expect path as third part after last colon. It expects option. The format should be src:dest:options.
First, in the script we shouldn't rely on ${PWD}, we should use the absolute path.
Second, the -t option should be removed so it works in cron. When -t is there, I get the following error when run in cron:
docker run --rm -it -v /opt/gitlab/mirror/config:/config -v /opt/gitlab/mirror/mirrors:/data/Mirrors -e GITLAB_MIRROR_GITLAB_UID=0 -e GITLAB_MIRROR_GITLAB_USER=gitmirror -e GITLAB_MIRROR_GITLAB_NAMESPACE=Mirrors -e GITLAB_MIRROR_GITLAB_URL=**** quay.io/klowner/gitlab-mirrors:latest update test_repo
cannot enable tty mode on non tty input
Hi,
I noticed that most projects put their container images to the cetral docker registry so in docker-compose.yml you put something like
gitlabmirror:
image: klowner/gitlab-mirrors:latest
instead of:
gitlabmirror:
image: quay.io/klowner/gitlab-mirrors:latest
I'm relatively new to docker, so maybe this request doesn't make sense...
I've got Gitlab up and running ( meaning I was able to add a new Github remote to my Mirrors group using the gitlab-mirrors.sh
script below ).
But every time I try to run another command I get:
ฯ ./gitlab-mirrors.sh ls
chown: /data/Mirrors/project-x/objects/pack/pack-dca3292bf5a38f06677b52995ebf594a2b3dd4d5.idx: Permission denied
chown: /data/Mirrors/project-x/objects/pack/pack-dca3292bf5a38f06677b52995ebf594a2b3dd4d5.pack: Permission denied
contents of gitlab-mirrors.sh
:
docker run --rm -i \
-v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) \
-v "${PWD}/config:/config" \
-v "${PWD}/mirrors:/data/Mirrors" \
-e SSH_AUTH_SOCK=$SSH_AUTH_SOCK \
-e GITLAB_MIRROR_GITLAB_UID=1000 \
-e GITLAB_MIRROR_GITLAB_USER=gitmirror \
-e GITLAB_MIRROR_GITLAB_NAMESPACE=Mirrors \
-e GITLAB_MIRROR_GITLAB_URL=http://my-gitlab.com \
quay.io/klowner/gitlab-mirrors:latest ${@:1}
When I remove those files I can run for example update
one more time, but the second run I will see the same problem again.
In the middle of Ludum Dare this weekend, but just plopping this here as a reminder to check and see why GITLAB_MIRROR_NEW_PUBLIC
doesn't work. I probably just missed it.
You can provide additional configuration settings by customizing the /data/.ssh/config
should be
You can provide additional configuration settings by customizing the /config/.ssh/config
Sometimes the command fails with
Error: ./update_mirror.sh buildroot (more information in /opt/gitlab-mirror/cron.log)
but now where to fetch the logs. A mount of the /opt/gitlab-mirror is not good since it contains essential stuff and thus the logfile will vanish on exit. So it would be nice to move the logfile to a different position and mount it with a volume.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.