Skip to content

Commit 1d6d474

Browse files
committed
fix: improve error messages for inaccessible repos and empty wikis
1 parent b80049e commit 1d6d474

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

github_backup/github_backup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,11 +2041,14 @@ def fetch_repository(
20412041
"git ls-remote " + remote_url, stdout=FNULL, stderr=FNULL, shell=True
20422042
)
20432043
if initialized == 128:
2044-
logger.info(
2045-
"Skipping {0} ({1}) since it's not initialized".format(
2046-
name, masked_remote_url
2044+
if ".wiki.git" in remote_url:
2045+
logger.info(
2046+
"Skipping {0} wiki (wiki is enabled but has no content)".format(name)
2047+
)
2048+
else:
2049+
logger.info(
2050+
"Skipping {0} (repository not accessible - may be empty, private, or credentials invalid)".format(name)
20472051
)
2048-
)
20492052
return
20502053

20512054
if clone_exists:

0 commit comments

Comments
 (0)