Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change admin password in Gitea

Tags:

git

gitea

I created an admin user with a password, that contains a special character. Installation of Gitea was successful, but I can't login. I can't get new password, because it says:

Sorry, Register Mail Confirmation has been disabled.

I tried command gitea admin change-password, but command is not recognized.

like image 576
plaidshirt Avatar asked Mar 01 '18 19:03

plaidshirt


Video Answer


2 Answers

For Current GITEA sometime it will not work by

cd /path/to/gitea
./gitea admin change-password --username myusername --password asecurenewpassword

You need to specify the configuration also e.g. :

cd /path/to/gitea
./gitea admin change-password --username myusername --password asecurenewpassword -c "/etc/gitea/app.ini"
like image 69
Rendy The Code Avatar answered Sep 22 '22 06:09

Rendy The Code


For NixOS users, it's a bit more complicated:

su
su gitea
nix-shell -p gitea
gitea admin user change-password -c /var/lib/gitea/custom/conf/app.ini -u user-name -p new-pwd

(tested on Gitea version 1.15.6)

like image 30
luochen1990 Avatar answered Sep 20 '22 06:09

luochen1990