christianspecht / scm-backup

Makes offline backups of your cloud hosted source code repositories
https://scm-backup.org/
GNU General Public License v3.0
59 stars 20 forks source link

Backing up GitHub wikis doesn't work when the wiki is enabled, but doesn't exist #13

Closed christianspecht closed 6 years ago

christianspecht commented 6 years ago

The only thing that GitHub's repository API returns about wikis is the has_wiki property.

Unfortunately, has_wiki = true only indicates that the "wiki" checkbox in the repository's settings is checked (i.e. it's possible to create a wiki), but it doesn't mean that the repo actually has a wiki.

The API doesn't return a clone URL for the wiki, so we need to build it manually - but when a wiki is enabled, but doesn't actually exist, the cloning fails and SCM Backup exits.

christianspecht commented 6 years ago

before trying to clone, use git ls-remote to check whether it exists