Solution for adding an admit user for Gitea

The problem that I had was I installed Gitea and selected the second admin account to be the admin. Yunohost created the first admin account as an account, but not an administrator.

By following these directions, I was able to create a new administrator account.

I came across this post on this forum: Add user to single app (gitea) but not ynh - Support apps - YunoHost Forum

The useful part of the post was this:

cd /opt/gitea
sudo -u gitea gitea admin user create --name ...

I also came across this other post: gitea: create admin user - ricardo malla’s blog
Which contained this:
gitea admin user create --admin --username [username]--password [password] --email [emailaddress]

I was able to create an admin account using this command:

cd /opt/gitea
sudo -u gitea gitea admin user create --admin --username myuser --password mypassword --email myemail

I hope that this post will be useful to anyone else who has the same problem.

The app is configured with LDAP, and offers a Gitea (admin) permission in the permissions panel of YunoHost. Doesn’t that work?

1 Like

There’s an entry under the settings for the Gitea application that says “admin” and I entered the name of the existing user and saved it, but that didn’t do anything.

I selected the second Yunohost admin when creating Gitea, but it didn’t work.

I’ve been using the second admin account I created on Yunohost because I didn’t realize it used LDAP and would use the same account with the website, so I didn’t use the same username I wanted to use on the sites. I thought I was created a seperate admin account from what would be used on the sites.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.