To download an archive of your repository, you can use the API for user or organization migrations. For more information, see "Migrations."
Once you have downloaded your archive, you can copy it to an external hard drive and/or upload it to a cloud-based backup service such as Google Drive or Dropbox.
Third-party backup tools
A number of self-service tools exist that automate backups of repositories. Unlike archival projects, which archive all public repositories on GitHub that have not opted out and make the data accessible to anyone, backup tools will download data from specific repositories and organize it within a new branch or directory. For more information about archival projects, see "About archiving content and data on GitHub."
You can back up all of a repository's Git data (such as project files and commit history), as well as much data from GitHub (such as issues and pull requests), with BackHub, which creates daily recurring backups of your repositories with snapshots up to 30 days back in time. BackHub is available in GitHub Marketplace.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
