I want to download all created repositories from my account (public, private, forked), for backup purpose. How can I do it?
CodePudding user response:
If your goal is to create backup archives of your repositories in case something happens to them on GitLab, it may be best to look into using something like python-gitlab
or the GitLab Import/Export API.
With this, you can generate an Access Token for your account and pass it to the API, then iterate through all of your projects and export them (rather than doing it all through the website, which takes a while.) In this way, if you ever needed to "restore" them, you could import them into a blank project OR forcibly overwrite an existing project using the API.
If your goal is to keep backups that are NOT GitLab-related, I would definitely look into a similar method as described in How to clone all GitHub Repos at once.