gitgitea

Change admin password in 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.


Solution

  • It's the future now and the other answers will no longer work. I found this answer because I had the same problem. I know I will mess this up again as this is already 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.

    Relevant Gitea Documentation