There is a Forgejo RPM available. I downloaded and installed the RPM. I can start it using systemctl start forgejo and get a login screen. But how can I login?
Maybe you have to add a user first, as detailed in Self Hosting Forgejo - DEV Community or Forgejo: OS GIT - Fresh/Brewed ?
Hi MatH,
thanks for the info. Unfortunately, it failed, too.
bash-5.3$ forgejo admin user list
ID Username Email IsActive IsAdmin 2FA
bash-5.3$ forgejo admin user create
Command error: email is not set
There is no user installed by default and obviously you need the initial Configuration screen as described in the upstream documdentation so set this, along with some other basic configuration.
Can you run us through the steps you have taken so far?
Did you create the SQL tables and such?
I see the Fedora Infra team use an Ansible Playbook to deploy, and I see other users online using Docker scripts.
I basically just did a dnf install and then a localhost:3000 with a browser. According to upstream documentation, at the first time a configuration screen should show up, but didn’t. Either there is some documentation missing or the rpm is broken. I suppose, it’s the former.
And as far as I know, infra doesn’t use the Fedora RPM but their own customized and branded variant. I had a short talk in their Matrix room a while ago. I guess, I’ll inspect the rpm SPEC file and the additional resources as soon as I can manage to spend some time.
I followed the instructions at Installation from binary | Forgejo – Beyond coding. We forge.
with the Fedora repos RPM, and could not get it to work either.
I did not change anything in app.ini - I see one can set email address in there…
Maybe give this a try, I use this exact syntax in an ansible role I built that deploys this same RPM:
/usr/bin/forgejo -c /etc/forgejo/conf/app.ini \
admin user create \
--username <username> \
--password <password> \
--email <email> \
--must-change-password=false \
--admin true
I can’t remember exactly how I arrived to this conclusion other than trial and error, I don’t believe it’s documented or not well enough if it is.
I hope that helps, I have done probably hundreds of these installs now tweaking my own role. I am most likely going to abandon the RPM effort in favor of a binary install, there’s a new Ansible role for Forgejo that has been published here for that:
This is forked and based off an excellent role for gitea I have also used in the past.