This is a quick and dirty script I came up with for a singular purpose: Back up my own repos on Gitlab to a directory on my home server. The idea is to preserve project files somewhere, independent of where they might live on the cloud.
Some will question the lack of any error handling and the cowardly use of shell commands, and rightly so. But this is a work in progress. Stay tuned for improvements!
My Gitlab API private token is currently set as an environment variable in my home directory (not the best security, for sure).
I only wrote this because I couldn't find anything better that I could grok (which is a progressively lowering bar).
See the docs for python-gitlab for more in-depth. FYI, this is an entirely different library from gitlab. Install python-gitlab with pip install python-gitlab
(or sudo pip3 python-gitlab
if you're on a Linux distro like Ubuntu and