GithubHelp home page GithubHelp logo

Comments (14)

simbo1905 avatar simbo1905 commented on August 18, 2024 1

I have created PR #5 to fix this. Until it is merged and the image deployed you can use my copy of the fix to gitea 1.9.2

oc new-app -f https://raw.githubusercontent.com/wkulhanek/docker-openshift-gitea/master/openshift/gitea-persistent-template.yaml \
  --param=HOSTNAME=${GITEA_URL} \
  --param=GITEA_VERSION=1.9.2 
  --param=GITEA_IMAGE=docker.io/simonmassey/gitea

from openshift-gitea-image.

simbo1905 avatar simbo1905 commented on August 18, 2024 1

Hi @jonathan-velasco

I posted a link above to the PR with the fix above. The change is to the script that launches gitea here: https://github.com/wkulhanek/docker-openshift-gitea/pull/5/files

Simon

from openshift-gitea-image.

flothemaker avatar flothemaker commented on August 18, 2024

Same problem with image 1.8.1

from openshift-gitea-image.

MohamedTalhaoui avatar MohamedTalhaoui commented on August 18, 2024

Does anyone having any idea about the root cause ?
I can understand the error since, at startup, gitea tries to write the generated token in the app.ini which is mounted from a configMap and therefore read only.
I cannot get why using image 1.7.5 solves the issue.
I was expecting the fix to be on the openshift template.
Any idea ?

from openshift-gitea-image.

rilindo avatar rilindo commented on August 18, 2024

Note that you don't need to edit the template if you do need to over the version - you can just pass the versions as a param:

oc new-app -f https://raw.githubusercontent.com/wkulhanek/docker-openshift-gitea/master/openshift/gitea-ephemeral-template.yaml --param=HOSTNAME=gitea-demo.yourdomain.com --param=GITEA_VERSION=1.7.5

from openshift-gitea-image.

Mundo-Dev0ps avatar Mundo-Dev0ps commented on August 18, 2024

Hello @simbo1905 , what do you change in Dockerfile?, I am making an image based on alpine but i get the same error: "saving generating JWT secret to custom config: open /home/gitea/conf/app.ini: read-only file system"

from openshift-gitea-image.

Mundo-Dev0ps avatar Mundo-Dev0ps commented on August 18, 2024

Hi @simbo1905 ,

Ty very much, I make pull request for dockerfile with alpine base image for if you need it
PR 7

Regards

from openshift-gitea-image.

zdzichu avatar zdzichu commented on August 18, 2024

Hey @wkulhanek , any chance of getting this fixed (by PR 5)?

from openshift-gitea-image.

wkulhanek avatar wkulhanek commented on August 18, 2024

@zdzichu Sorry, somehow I missed this. What exactly is the problem? I'm actually at 1.11.3 now with this image and have been running this forever. Or course I never run the image directly (or through the template) anymore but only through the operator.

from openshift-gitea-image.

wkulhanek avatar wkulhanek commented on August 18, 2024

I updated the app.ini in the template. This is the same that I use in the operator. Let me know if it works now. @zdzichu

from openshift-gitea-image.

zdzichu avatar zdzichu commented on August 18, 2024

I'm surprised it works for you. Nevetherless, the summary of problems:

  • oauth2 has been enabled by default in gitea
  • when gitea starts and there are no JWT_SECRET, LFS_JWT_SECRET in config file, gitea tries to generate the secrets and store them in app.ini; this fails because filesystem is read-only

Possible solutions:

  • generate secrets and store them in configmap creating app.ini
  • modify config map to disable oauth2 support
  • provide writable configuration - that's what mentioned PR does

from openshift-gitea-image.

wkulhanek avatar wkulhanek commented on August 18, 2024

Yeah. I disabled oauth2...

from openshift-gitea-image.

wkulhanek avatar wkulhanek commented on August 18, 2024

Let me investigate the writable config.

from openshift-gitea-image.

wkulhanek avatar wkulhanek commented on August 18, 2024

That PR won't work - at least not for subsequent starts. I am closing this issue because I disabled OAuth2 for now.

from openshift-gitea-image.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.