Skip to content

Repo with existing directory misleadingly fails with 500 #7374

Closed
@commel

Description

@commel

Hi,

  • Gitea version (or commit ref):
  • Git version: 1.8.3
  • Operating system: Windows Server 2019 DS 1809
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (because i cant delete a repo without removing its directory there)
    • Not relevant

Description

we switched servers (and datbase backends from sqlite3 to mssql) but keeped the repository directories. I needed to recreate the former existing repository entries in gitea. After clicking "create repository" it resulted in a 500 error page. After refresh the empty repository was available.

In the logs I found this:
2019/07/08 10:00:23 [...routers/repo/repo.go:146 handleCreateError()] [E] CreatePost: initRepository: initRepository: path already exists: d:\repos\secretuser\secretrepo.git

The error is misleading (and probably not wanted in that way) here as it works in the background. A notification message would be better to inform that the directory is already existing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions