Skip to content

alces/gitlab-rest-client

Repository files navigation

REST API client for gitlab servers

This is gitlab REST API client library written in Python (currenty tested against Python 2.7.8 [GCC 4.9.2 20141101 (Red Hat 4.9.2-1)]). It supports working with the following kinds of gitlab objects:

  • branches
  • groups
  • projects
  • users

copyGroup.py is a sample script using this library to copy a group with all the included members and repositories from one gitlab server to another.

Configuration files

URLs and private tokens for all the gitlab servers you're working with (a.k.a. 'systems') should be placed in the ~/.gitlab_systems.json (this file must be readable and writable only by its owner). Example of its content could be found in dot.gitlab_systems.sample.json. Gitlab users whose tokens are saved in this file have to have permissions to do all the things you're planning to do by this client on the particulary server.

Documentation

Gitlab's REST API is pretty well documented here: https://github.com/gitlabhq/gitlabhq/tree/master/doc/api.

Bugs and gotchas

  1. while creating a user, the confirm flag is ignored;

  2. if you use file-level commands (such as rsync, cpio, etc.) for copying content of a git repository, it should be done after creation a project the repository belongs to, not before.

About

A client library for working with gitlab servers using REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages