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/gitea is gitea's home path, where you find folder custom.
In my case gitea's home is /var/lib/gitea. From this path, you should see file: custom/conf/app.ini which 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

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?