Skip to content

Internal Server Error upon creating new pre-initialized repository #3206

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

Closed
strk opened this issue Dec 16, 2017 · 11 comments
Closed

Internal Server Error upon creating new pre-initialized repository #3206

strk opened this issue Dec 16, 2017 · 11 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@strk
Copy link
Member

strk commented Dec 16, 2017

As of bdf1856 (1.3.0-dev) installed locally, creating a new repository and requesting to initialize it ends up returning a 500 internal server error.
Console outputs do not show anything interesting other than:

2017/12/16 21:42:59 [I] [SQL] INSERT INTO "action" ("user_id","op_type","act_user_id","repo_id","comment_id","is_deleted","ref_name","is_private","content","created_unix") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" []interface {}{3, 1, 3, 2, 0, false, "", false, "", 1513456979}
2017/12/16 21:42:59 [I] [SQL] ROLL BACK
[Macaron] 2017-12-16 21:42:59: Completed /repo/create 500 Internal Server Error in 43.473658ms

Log shows:

2017/12/16 21:42:59 [...routers/repo/repo.go:123 handleCreateError()] [E] CreatePost: initRepository: initRepository: path already exists: /home/strk/gitea-repositories/strk/test.git

At the end of this, on the filesystem there's no such repository

@lunny
Copy link
Member

lunny commented Dec 20, 2017

@strk @lafriks This should not be a bug. This issue indicates your database repo record was deleted but the file system repository was not.

@lafriks
Copy link
Member

lafriks commented Dec 20, 2017

@lunny but it should fail with normal error message not with internal server error

@Larivact
Copy link

Larivact commented Jan 19, 2019

This error can currently be reproduced with the demo site: https://try.gitea.io/repo/create

@zeripath
Copy link
Contributor

hmm... @Larivact how did you replicate this on try?

@zeripath
Copy link
Contributor

I think I agree with @lafriks though - it shouldn't be a 500, we should probably handle this more nicely and just adopt the repository informing the user.

@Larivact
Copy link

I created an account and attempted to create a repository entering just a name and checking Initialize Repository (Adds .gitignore, License and README).

@zeripath
Copy link
Contributor

@Larivact that's a very likely a different bug - this bug is specifically about the case where you have repositories already in your gitea-repositories directory and you are effectively trying to get gitea to adopt these new repos. Did you manage to do this on try? If so, please explain how you did this.

If not, you should open a new bug report for the issue you experienced, and try to tell us as much information about how you got the 500 as possible as I can't replicate this immediately at present.

@lunny
Copy link
Member

lunny commented Jan 19, 2019

@Larivact haven't reproduce on try.gitea.io, could you give more details?

@Larivact
Copy link

I apologize for commenting on the wrong issue. I encountered a different bug, for which I just opened #5772.

@stale
Copy link

stale bot commented Mar 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Mar 20, 2019
@lunny lunny added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented and removed issue/stale labels Mar 21, 2019
@midacts
Copy link

midacts commented Oct 27, 2019

I ran into this today as well (I'm new to Gitea and it was my first repo).
I created a new repo and selected "Initialize Repository (Adds .gitignore, License and README)".

After selecting to create the repo i got a 500 error (as above).
After deleting the repo and not selecting that setting, it worked as intended.

@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

No branches or pull requests

7 participants