Hi,
You are right, the script will only work with KDE git server host, not github or gitlab mirror, because extra repository "digikam-doc" do not exists on mirror.
But to compile whole digiKam, you don't need the doc repository. You can forget the stage to run this script.
Best
Gilles Caulier