Change Admin Password In Gitea
Answer :
From your issue, any gitea command (like gitea admin change-password --username myusername --password asecurenewpassword) ends up with:
gitea: command not found If you installed from binary, you will note that the $PATH was not modified, and gitea was called directly from its installation folder.
./gitea web So you can do the same for changing the password:
cd /path/to/gitea ./gitea admin change-password --username myusername --password asecurenewpassword Note that Robert Ranjan adds in the comments:
/path/to/giteais gitea's home path, where you find foldercustom.
In my case gitea's home is/var/lib/gitea. From this path, you should see file:custom/conf/app.iniwhich is expected by default.
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" Its the future now and the answers above will no longer work. I found this answer because I had the same problem. I know I fill mess this up again as this is my second time, so hello future me!
Non-docker answer:
gitea admin user change-password -u <username> -p <password> Docker answer:
docker exec -it <container ID> su git bash -c "gitea admin user change-password -u <username> -p <password>" Replace <container ID>, <username> and <password> with the appropriate values.
Comments
Post a Comment