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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Gitea
  3. Root password reset and more generally Gitea CLI usage

Root password reset and more generally Gitea CLI usage

Scheduled Pinned Locked Moved Solved Gitea
3 Posts 2 Posters 17.8k Views 2 Watching
  • 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 Offline
    L Offline
    luzeal
    wrote on last edited by
    #1

    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
    
    girishG 1 Reply Last reply
    0
    • L luzeal

      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
      
      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @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
      0
      • L Offline
        L Offline
        luzeal
        wrote on last edited by luzeal
        #3

        @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
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search