-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Error 500 on create new repo #7499
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
Comments
I also am getting this issue. Gitea 1.8.3 (archlinux official package). Was working on previous versions with same config. |
Same, very basic error. It already caused a very bad impression as I was just trying to migrate off of gogs... |
logs read:
|
@dmorilha I get exactly the same log entries. It appears that it never creates the git repository on disk. The filesystem is definitely writable by gitea (confirmed by
While this is an annoying error, please try to avoid getting annoyed. Remember that this is a community project run by volunteers. :) The issue has been reported and confirmed by multiple users, so now we give the developers a chance to investigate and fix it. |
Hi peeps. Sorry you've been suffering this - it sounds really annoying. There might be two different issues here. How are you creating the repos? It looks like you're creating them with default initialisation files? Does the error go away if you don't set that? @dimmuboy the log above looks like the error is hitting in finding the webhook in the pre-receive hook during initrepository. (Btw those logs are from 1.9-rc not 1.8 - does 1.8 have different logs?) This might be an initialisation bug - but I don't understand why 1.8 would be affected. Pre-receive should probably not be being called during initialisation as it's unlikely that the repository is set up correctly - although I thought this call was delayed till the repo was correctly set up. Does the equivalent work on try? @dmorilha your log is a bit more odd. The important bit is the I think in either case the place to begin looking is in InitRepository. I won't probably be able to do this until Sunday but hopefully my hint suggests the place in the code to look for the problem for another maintainer. |
I wasn't, but I get a 500 error whether I check the default initialization files or not. I get the same log output as @dmorilha and I can confirm that the directory it's mentioning is correct, and is owned by the gitea user and group. (the parent of the {reponame}.git directory that is; I haven't observed the {reponame}.git being created.) Interestingly if I downgrade to 1.8.0 or 1.8.1, I'm still getting the 500 error and same log output. Could be same unrelated system change that is triggering it then. |
@swalladge how are you running Gitea? Is this docker, systemd or something else? |
v1.8.0, 1.8.1, 1.8.3 still same error
|
Bare metal on archlinux using the official archlinux gitea package, using systemd to manage running it, postgres database.
July 19, 2019 6:42:00 AM UTC zeripath <[email protected]> kirjoitti:
…@swalladge how are you running Gitea? Is this docker, systemd or
something else?
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
|
If I try to create repo without initializing it is created but after push I got error
|
Is your data directory mounted non exec? That could easily be the cause of your problem. |
@zeripath yes I tried it |
I'm getting the same error with the exact same behaviour on Kubernetes Gitea helm chart |
Yes of course. This is first thing what I tried and all users have full permissions. |
With Gogs I have totally same problem. |
Hello All, Gitea version (or commit ref): 1.9.0 |
Same problem: Gitea version: 1.9.1 The filesystem is NOT read-only as pushes to other repos work and creating/deleting files using both rm and unlink works too. It's a btrfs filesystem. EDIT: Rebooting the machine will help if you have luck. Just restarting Gitea doesn't help. |
Same here on v1.9.2 and PostgreSQL. Before first push or initialising, repo is accessible fine. Any push causes it to occur (not just initialising). File system not read-only. I've tried SSH & HTTPS, OpenID & local login and private & non-private. Restarting container\pod doesn't help. Doesn't happen using https://try.gitea.io. Error, as others have reported, is:
What is the most recent version without this issue that we can roll back to? v1.82? |
Rolling back doesn't help @holmesb, I tried 1.9.0 and 1.8.2. Yes, it should be safe to downgrade to 1.8.2, no obvious issues came to sight (although I upgraded again after realizing it did not help) |
this helped me: https://docs.gitea.io/en-us/faq/#can-t-create-repositories-files I can recall seeing it in a different github comment but I can't seem to find it now. I added all the paths I needed by simply adding
in the [Service] section accordingly and that seems to be working fine now.
on arch the file is /usr/lib/systemd/system/gitea.service |
Sounds plausible @xdevs23. Must be platform\infra related if https://try.gitea.io works. But I'm using the alpine docker image. No systemd, so unsure where to put |
That only works if you are running Gitea as a systemd service and a ReadWritePaths= line was already there (which the Arch package does). |
@xdevs23 :O I can confirm that adding the repos directory to I don't know how that suddenly became an issue though - perhaps I had originally edited the main service file and then it was overwritten by an update (instead of using a service override file). It also doesn't explain why it only affects creating repositories... 🤔 |
It affects all write operations but somehow it's delayed. I was able to reboot and create repositories again, it was just a matter of minutes before it stopped working again. This can as well be related to a recent change to systemd or the kennel. Adding the ReadWritePaths definitely fixed the issue for me but it might be worth investigating. |
@holmesb I think that they are multiple issue there are now in this one issue. One specific to windows, one on Archlinux (which seems solved), and yours on docker. All seems to be related to gitea not being able to read some folders for various reason. Please fire an other issue or go to the gitea discord (there is one chan specific for docker) this would help debug your specific case. |
Done @sapk |
Just came across this myself - never had issues previously. Turned out to be an incorrect There was nothing in the logs that suggested this was the problem, there was only this: |
After I upgraded my openwrt, I found that sometimes it might be related to bash/git. By tracking the log file, I found out that my problem occurred in "'bash': No such file or directory" After I installed bash correctly, this problem was ruled out. ↓↓↓↓======= my log============= 2019/11/09 14:31:01 [I] Log Mode: File(Info) |
You can change the SCRIPT_TYPE on app.ini. |
!!!!! |
i meet the same question,if you know how to fix it pelease call me |
It's strange that my log didn't report the wrong information,only web show 500 status code |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
That fix for me. And I see the log: 2020/03/21 01:45:45 routers/repo/repo.go:159:handleCreateError() [E] CreatePost: initRepository: initRepoCommit: git push: exit status 1 - remote: env: bash: No such file or directory Looks like gitea can no found the bash command, and I was in FreeBSD, there's no bash.. |
[x]
):Description
Hello there,
on fresh new server installation I get Error 500 page after create new repo when I check Initialize Repository otherwise repo is created but can’t push any data.
Gitea log:
Gitea config:
The text was updated successfully, but these errors were encountered: