go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.02k stars 5.49k forks source link

500 error while creating new repo from template #15154

Open kreys opened 3 years ago

kreys commented 3 years ago

Description

I have created some template project for new repositories, it has some base structure and some githooks prepared, also for git-lfs usage. When I use it as a template and created new repository with this template I get 500 error. Repository looks like it wasn't created, however I can't find it in unadopted files. After adopting it is just empty repo, not based on my template.

From logs it looks like there is some issue with git lfs githooks probably?

Repro steps: 1) Create new repo, configure it for use with git-lfs 2) Mark it as template 3) Create new repo with this template

Forking such repo works normally.

kreys commented 3 years ago

One more thing worth mentioning, I thought that might be relevant - while creating template repo I was using custom git hooks path (located in .githooks directory) and git-lfs hooks went there.