clockfort / GitHub-Backup

Backup all the repositories of a github user or organization automatically.
Creative Commons Zero v1.0 Universal
359 stars 103 forks source link

Backing up whole organisations does not work #49

Closed KygekDev closed 2 years ago

KygekDev commented 3 years ago

I get the following error when trying to run github-backup KygekDev . -o KygekTeam, which I done based on https://github.com/clockfort/GitHub-Backup#how-to-back-up-entire-github-organisation-repos:

Traceback (most recent call last):
  File "/home/acer/.local/bin/github-backup", line 8, in <module>
    sys.exit(main())
  File "/home/acer/.local/lib/python3.8/site-packages/github_backup/github_backup.py", line 108, in main
    account = gh.get_organization(args.login_or_token)
  File "/home/acer/.local/lib/python3.8/site-packages/github/MainClass.py", line 296, in get_organization
    headers, data = self.__requester.requestJsonAndCheck("GET", f"/orgs/{login}")
  File "/home/acer/.local/lib/python3.8/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/home/acer/.local/lib/python3.8/site-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/orgs#get-an-organization"}

What can I do to fix/solve the issue?

eclRDuran commented 3 years ago

Same issue

allem40306 commented 3 years ago

use

github-backup <org_name> <dir_name> -o <org_name> to solve

(I use ssh-key to login github)

jashby44 commented 3 years ago

Thanks @allem40306 , using github-backup org_name ... instead of username (as the README suggests) fixes it for me.

stv0g commented 2 years ago

Updated docs in: https://github.com/clockfort/GitHub-Backup/commit/9375b3637b4734e7c0d14c50d0d5fb7482a96d3f