Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Root password reset and more generally Gitea CLI usage

    Gitea
    2
    3
    9678
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      luzeal last edited by

      Hello,

      I haven't been able to reset the root account password on my Gitea instance, and more generally, any command that I issue (/home/git/gitea/gitea admin user list) do fail.

      It appears that Gitea doesn't want to pick the custom location for configuration file, or that I don't know how to set it up correctly.

      Related discussion here on Stackoverflow.

      su git bash -c "/home/git/gitea/gitea admin user change-password -u root -p badpassword -c "/app/data/app.ini" "

      Any help would be greatly appreciated

      root@6cb7d536-ceaa-4d26-b387-fbd54b1c02b6:/app/data# su git bash -c "/home/git/gitea/gitea user list"
      2021/10/29 16:46:48 cmd/web.go:102:runWeb() [I] Starting Gitea on PID: 26034
      2021/10/29 16:46:48 ...s/setting/setting.go:569:NewContext() [W] Custom config '/home/git/gitea/custom/conf/app.ini' not found, ignore this if you're running first time
      2021/10/29 16:46:48 ...s/setting/setting.go:1164:CreateOrAppendToCustomConf() [F] failed to create '/home/git/gitea/custom/conf/app.ini': mkdir /home/git/gitea/custom: read-only file system
      
      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @luzeal last edited by

        @luzeal Try something like:

        sudo -u git /home/git/gitea/gitea -c /run/gitea/app.ini admin user change-password -u root -p changeme123
        

        To explain:

        • The app runs as git user (doesn't run as root)
        • The config file is located at /run/gitea/app.ini
        • The gitea binary is at /home/git/gitea/gitea

        I will update our docs with this info.

        1 Reply Last reply Reply Quote 0
        • L
          luzeal last edited by luzeal

          @girish

          Thanks for your extremely quick and helpful answer!

          It worked!

          Side note: I have been using cloudron for about 2 years now, and I am a happy paying customer.

          The fact that it is the first question I had to ask so far is a testament to the quality of your work and documentation. Congratulations to the team!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB