Skip to content
Snippets Groups Projects
Commit 53aae58e authored by Sam Gleske's avatar Sam Gleske
Browse files

Merge branch 'development' release v0.2.8

parents ec5fdda0 2cb18a0a
No related branches found
No related tags found
No related merge requests found
## gitlab-mirrors v0.2.8
* Fixed bug where `manage_gitlab_project.py` would attempt to move a project into the user namespace if the `gitlab_namespace` is equal to `gitlab_user`. No need to move a project from the same origin/destination group.
* Prerequisite documentation fix for installing `python-gitlab` instructions.
* Added support documentation for running `gitlab-mirrors` from a non-administrative user.
---
## gitlab-mirrors v0.2.7
* Renamed CHANGELOG to CHANGELOG.md
* Renamed `CHANGELOG` to `CHANGELOG.md`
---
## gitlab-mirrors v0.2.6
......
# Installation and Setup
This assumes you have already satisfied all [prerequisites](prerequisites.md).
This assumes you have already satisfied all [prerequisites](prerequisites.md). You can manage gitlab-mirrors in one of two ways. You can use your own user using your own GitLab private token. Or you can use a dedicated system user and gitmirror user whose only purpose is to mirror repositories. The former can be done by any user where the latter requires administrator privileges in GitLab.
## Using a dedicated GitLab user
Create a system user called `gitmirror` and generate SSH keys.
......@@ -31,5 +33,14 @@ Once you have set up your `config.sh` let's add the `git-mirrors.sh` script to `
@hourly /home/gitmirror/gitlab-mirrors/git-mirrors.sh
## Using your own user
Your steps will be similar to using a dedicated `gitmirror` user. Set up your SSH keys; copy `config.sh` and configure it; use your own system cron job to synchronize mirrors on a schedule. There are a few caveats to using your own user instead of a dedicated administrator.
1. Currently there is a bug in GitLab 6.0 [#5042][1] which prevents a non-Administrator GitLab user from moving a project to a group even if the group is owned by the user. This means that if you wish to mirror projects in namespaces other than your own username then you will have to first manually create the mirror in GitLab and then run the `add_mirror.sh` command (see Managing repositories).
2. You user will include mirror pushes in your user statistics.
---
Next up is [Managing mirrored repositories](management.md)
[1]: https://github.com/gitlabhq/gitlabhq/issues/5042
......@@ -18,7 +18,7 @@ python-gitlab
git clone https://github.com/Itxaka/python-gitlab.git
cd python-gitlab
git checkout 9c5e375599a6d89ab1f4520224f47b43b40bcf9b
python setup.py
python setup.py install
You can find the source to git at the [git-core project][5]. For instructions on other platforms see the [Getting Started - Installing Git section of the git book][6].
......
VERSION="v0.2.7"
VERSION="v0.2.8"
......@@ -75,9 +75,9 @@ def createproject(pname):
else:
description=options.desc
new_project=git.createProject(pname,description=description,issues_enabled=str(int(options.issues)),wall_enabled=str(int(options.wall)),merge_requests_enabled=str(int(options.merge)),wiki_enabled=str(int(options.wiki)),snippets_enabled=str(int(options.snippets)),public=str(int(options.public)))
new_project=findproject(gitlab_user,pname)
print new_project
new_project=git.moveProject(found_group['id'],new_project['id'])
if gitlab_user != gitlab_namespace:
new_project=findproject(gitlab_user,pname)
new_project=git.moveProject(found_group['id'],new_project['id'])
if findproject(gitlab_namespace,pname):
return findproject(gitlab_namespace,pname)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment