Troubleshooting Gitea
If something gets fucked up some day, or if you fuck up something, this is to help you to get things back running.
General
First try to find what causes the error. Is it just a wrong command, bad spelling, or doing stuff in the wrong order or wrong directory? Most of the times the error gets displayed in the command line, other times it's in a log file. If you can slim down the area where the problem is, troubleshooting will get a lot less time consuming. If you don't understand the Error message, type it into google, most of the times somebody already had that error. Also try to do efficient googling. Explain your problem as simple as possible when you type it into google. And don't bother to go past site 3 of the google search results. If it's not on page 1 or 2, you have most likely not googled the right thing.
Logs
Either the error is displayed in the command line, or in one of the logs. the ones that helped me are the service and gitea log.
Journalctl
Journalctl logs all the logging info of the services you got active. To just display the last 300 lines of all gitea specific logs, type in this:
journalctl -u gitea | tail -n 300
journalctl -u gitea
This command displays all the logs the gitea service produces. The |
pipes the output of the first command to the second command. tail -n 300
displays the last 300 lines of the command piped to it.
Gitea logs
Gitea normally logs all its stuff in a gitea.log file. You can watch the last 300 lines with this command:
more /etc/gitea/logs/gitea.log | tail -n 300
tail
does the same as before, and more
just displays the content of a file, in this case our log file
Last words
Most importantly know what you are doing. If you just follow the instructions without giving a thought it, troubleshooting will be much harder. Common sense helps to avoid errors. If you still don't have a answer to your problem, you cna message me at marlon.samsifpv@gmail.com, i will give my best to help you.