From aba048a3e983074b2a0fba0d3e304c00cd090d79 Mon Sep 17 00:00:00 2001 From: Rodos Date: Sun, 7 Dec 2025 21:20:54 +1100 Subject: [PATCH] fix: warn when --private used without authentication --- bin/github-backup | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/github-backup b/bin/github-backup index d685bc9..dcac622 100755 --- a/bin/github-backup +++ b/bin/github-backup @@ -9,6 +9,7 @@ from github_backup.github_backup import ( backup_repositories, check_git_lfs_install, filter_repositories, + get_auth, get_authenticated_user, logger, mkdir_p, @@ -37,6 +38,12 @@ logging.basicConfig(level=logging.INFO, handlers=[stdout_handler, stderr_handler def main(): args = parse_args() + if args.private and not get_auth(args): + logger.warning( + "The --private flag has no effect without authentication. " + "Use -t/--token, -f/--token-fine, or -u/--username to authenticate." + ) + if args.quiet: logger.setLevel(logging.WARNING)