Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo with existing directory misleadingly fails with 500 #7374

Closed
2 of 7 tasks
commel opened this issue Jul 8, 2019 · 6 comments
Closed
2 of 7 tasks

Repo with existing directory misleadingly fails with 500 #7374

commel opened this issue Jul 8, 2019 · 6 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@commel
Copy link

commel commented Jul 8, 2019

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.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jul 8, 2019
@dimmuboy
Copy link

dimmuboy commented Jul 16, 2019

I have same error with empty MSSQL database and initial Gitea config. I tried add LOCAL_ROOT_URL = http://127.0.0.1:3000 to config, change permissions, database, new 1.9.0 version but still same error.

@lunny
Copy link
Member

lunny commented Jul 17, 2019

@dimmuboy Did you also have an exist repository on the same path as your created?

@dimmuboy
Copy link

@dimmuboy Did you also have an exist repository on the same path as your created?

No I created completely new repo dir

@lunny
Copy link
Member

lunny commented Jul 17, 2019

@dimmuboy Did you also have an exist repository on the same path as your created?

No I created completely new repo dir

So you should have a different issue as this one.

@dimmuboy
Copy link

dimmuboy commented Jul 17, 2019

So you should have a different issue as this one.

Yes but IMHO it will be problem with database because main dir sctructure "repository/username/" was created. In original post @commel wrote about switch to MSSQL like me.

Edit: In my case error 500 shows only when creating new repo and check Initialize Repository otherwise repo is created.

@wxiaoguang
Copy link
Contributor

It has been fixed #24164 by the way

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

4 participants