Skip to content

janriemer/export-my-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

export-my-github

A CLI tool for exporting your data on Github to your local hard drive.

Motivation

According to GDPR Art. 20 a company has to give you access to the personal data it has stored about you in a structured, commonly used and machine-readable format where the processing is carried out by automated means. In my opinion, Github fails at this miserably! You have to curl your way to their apis to get all the data you want. They call it "Data Portability tools" - what a cheek!

Once again, it seems we have to clear out the 🦄 💩. Let's cry power!

You might ask:

But why not file a case against Github and wait until they have fixed this?

Because we need this - now!

Install

$ npm i export-my-github -g

Or, if you just want to use it once:

$ npx export-my-github

Prerequisites

  1. Node >= 8
  2. Create a personal access token with read access for your Github account on the following entities:
  • repo
    • repo:status
    • repo_deployment
    • public_repo
    • repo:invite
  • user
    • read:user
    • user:email
    • user:follow

Usage

$ export-my-github

or

$ emg

After execution you will first be asked for your username and personal access token (PAT) (see Prerequisites).

⚠️ Do not give your PAT to a software or website you don't trust! Otherwise it gains the right to do anything you have granted the PAT to do. This tool is open source, so you can always check the trustworthiness of this tool for yourself.

After your username and PAT have been validated, you can choose which data you want to export. Currently the following data can be exported:

  • Your repositories
  • The repositories you are starring
  • The people, who you follow
  • The people, who are following you

Your exported data will be archived in a gzip folder named myExportedGithub.tar.gz in the same directory where you have executed export-my-github.

License

GNU GPLv3