josegonzalez / python-github-backup

backup a github user or organization
MIT License
1.32k stars 238 forks source link

Github-backup in 140 repository org backups nothing #198

Open k8s-gpubuilder-markus opened 2 years ago

k8s-gpubuilder-markus commented 2 years ago

github-backup prai-org -t _TOKEN_redacted --organization --private --all

2022-05-20T14:57:20.874: Backing up user prai-org to /home/mars/github_backup 2022-05-20T14:57:20.874: Requesting https://api.github.com/user?per_page=100&page=1 2022-05-20T14:57:21.094: Retrieving repositories 2022-05-20T14:57:21.095: Requesting https://api.github.com/orgs/prai-org/repos?per_page=100&page=1 2022-05-20T14:57:22.566: Requesting https://api.github.com/orgs/prai-org/repos?per_page=100&page=2 2022-05-20T14:57:23.295: Filtering repositories 2022-05-20T14:57:23.296: Backing up repositories 2022-05-20T14:57:23.296: Retrieving prai-org starred repositories 2022-05-20T14:57:23.296: Requesting https://api.github.com/users/prai-org/starred?per_page=100&page=1 2022-05-20T14:57:23.556: Writing 0 starred repositories to disk 2022-05-20T14:57:23.557: Retrieving prai-org watched repositories 2022-05-20T14:57:23.557: Requesting https://api.github.com/users/prai-org/subscriptions?per_page=100&page=1 2022-05-20T14:57:23.854: Writing 0 watched repositories to disk 2022-05-20T14:57:23.855: Retrieving prai-org-ai followers 2022-05-20T14:57:23.856: Requesting https://api.github.com/users/prai-org/followers?per_page=100&page=1 2022-05-20T14:57:24.117: Writing 0 followers to disk 2022-05-20T14:57:24.117: Retrieving prai-org following 2022-05-20T14:57:24.118: Requesting https://api.github.com/users/prai-org/following?per_page=100&page=1 2022-05-20T14:57:24.375: Writing 0 following to disk

This does a lot of nothing, a verbose flag would be important, why it is not backing up any of the 140 repositories. A verbose flag (in my experience EVERY software needs it) would show what is being filtered and why it is just filtering everything, even when specifying --all

I'm a little confused, it says backing up user, but it actually means organization right? Because if I use the user instead of the org name, it can't find that.

whwright commented 2 years ago

It looks like there might be a bug with case sensitivity. Is the name of the organization all lowercase prai-org?

fielding commented 2 years ago

Just wanted to jump in and support @whwright's hypothesis. I was backing up my organizations and noticed the same thing, it is indeed case sensitive and matching how github shows it on the URL to the organization fixed the issue for me.

matkoniecz commented 1 year ago

I hit the same, turns out that I inverted streetcomplete and StreetComplete

Maybe it could show an error message "no such organization" or "no such repository" instead of showing logs that look like processing empty org?