Skip to content

A go script to retrieve the public repositories from various sources and sync them to a GitLab instance.

License

Notifications You must be signed in to change notification settings

JexSrs/git-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

github-to-gitlab-backup

A shell script to retrieve the public repos from a user in GitHub and sync them to a GitLab instance

It will retrieve and sync the following information for each public repo:

  • all the branches
  • all the tags
  • latest 10 releases & assets (asset retention of latest 10 releases, can be disabled in delete_asset function)
  • wiki if available

Prerequisites

  • GITHUB_TOKEN: the user's GitHub token (to allow higher rate limit)
  • GITLAB_URL: the target GitLab instance
  • GITLAB_TOKEN: the user's token in the target GitLab instance
  • STORAGE_URL: the dufs instance url

Install packages:

sudo apt install curl jq

How to run

Make file executable:

chmod a+x script.sh

Execute:

./script.sh "BitWarden" "418"

or clone specific repositories only:

./script.sh "BitWarden" "418" "server clients"

About

A go script to retrieve the public repositories from various sources and sync them to a GitLab instance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published