gltools is a set of scripts to do simple things with Gitlab. Currently, there
is only backup_repos.rb
, which downloads all of a user's repositories and
produces a git bundle and a zip file for each repository.
Run bundle install
to install the required gems.
You'll need to obtain an access token for the Gitlab API.
- After logging in on Gitlab, go to Personal Access Tokens
- Enter
gltools
in the Name field. - Under Scopes, select 'api'.
- Click on 'Create personal access token'.
- Copy the access token from 'Your New Personal Access Token'.
- Create a file named
.gltools.token
in your home directory. - Edit this file and add the token string only to the first line of the file.
Run the following to back up your repos:
bundle exec ruby backup_repos.rb