diff --git a/gotelegram-bot/bot.py b/gotelegram-bot/bot.py index 97fadbb..f22eb9c 100644 --- a/gotelegram-bot/bot.py +++ b/gotelegram-bot/bot.py @@ -912,6 +912,9 @@ async def _download_custom_git_template(url_with_branch: str) -> Tuple[bool, str ): url = base branch = maybe_branch + elif not maybe_branch and base.lower().startswith("https://"): + # Trailing `@` with no branch — drop it so git doesn't treat it as userinfo + url = base tpl_id = "custom_" + hashlib.md5(url_with_branch.encode("utf-8")).hexdigest()[:10] target_dir = f"/opt/gotelegram/custom_templates/{tpl_id}"