Cannot create new release

After upgrading to 1.13.4 I have been unable to create new releases and get the Error 500 message when trying. Custom config files have been updated as needed for the new version and I have not seen anyone else having this issue so I am thinking it is a configuration issue. Looking into the logs shows:
2021/03/31 16:53:16 ...ters/repo/release.go:248:NewReleasePost() [E] CreateRelease: GetTagCommit: exit status 128 - fatal: ambiguous argument 'refs/tags/V5.3.0': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Creating the tag via git and pushing it in results in a similar error:
2021/03/31 16:56:48 ...s/repository/push.go:136:handle() [E] pushUpdate failed: PushUpdateAddDeleteTags: GetTag: exit status 128 - fatal: ambiguous argument 'refs/tags/V5.2.6': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Any ideas are appreciated.

This was after upgrading from 1.11.4 to 1.13.6.

Solution: This was due to the repo config in gitea-repositories being incorrect. The config that was working on the old version had “bare” removed and “workingtree” defined. After this was changed to the default config everything worked again. Default config:
[core]
repositoryformatversion = 0
filemode = false
bare = true
symlinks = false
ignorecase = true
[receive]
advertisePushOptions = true