Forgejo packaging V2 : test

Thank you @snm and @rodinux for your replies. But can this thread stay focus on testing the installation of forgejo ?

There is already an issue about admin access : Yunohost admin user doesn't have the admin role in Forgejo · Issue #33 · YunoHost-Apps/forgejo_ynh · GitHub
I’ll add a link to your comments in this issue and will take a look at Gitea to find how its maintainer manage this problem.

About the SSH key, I’ll work on it this morning. Thank you @snm

1 Like


Made a vanilla install (on a dev YNH instance) of Forgejo current App with no problem.

The made an upgrade to testing branch with no apparent problems.

Have a nice day

Thank you for your time @aris

1 Like

I found why the ssh access doesn’t work anymore after an upgrade. :sweat:

The upgrade process changes the forgejo user home directory.
I don’t know how to fix it yet. If a yunohost dev has some advice : I’ll take them :kissing_heart:

Meanwhile, I’m looking for the solution and come back on this thread soon.

OK, I know how to fix this mess :sweat_smile:
Just let me some time to find the best way about file location, and it will be OK.

this may not be the right answer but there is an option allow_ssh for [resources.system_user]

@ericg allow_ssh is set : no problem with that.

Here is a short summary of the issue I faced (if it can help other packagers).

  • Previously (packaging v1) home directory of forgejo user was set to the data dir (/home/
  • With packaging v2 the resources.system_user which is in charge of creating the forgejo user cannot use an environment variable to set the home directory. So I decided to let the default value (/var/www/forgejo aka install directory) which is quite fine.
  • I just add a mv command in the upgrade script to move .ssh directory to its new location.
  • But with this correct configuration forgejo still create its .ssh directory in the old home directory (/home/ :scream:. Therefore the ssh access still didn’t work.
  • I found the mistake : it remained in the systemd service file, a HOME environment variable set to /home/ That’s why forgejo used to create .ssh in this directory instead of its real home directory. I deleted this config, which is a legacy from the Gitea fork.

@snm Sorry to abuse of your time, but if you can make again the test of the upgrade process, and try to push a repo, it will be great.
(testing branch is ready)

1 Like

Hi thank you for this report @rodinux
I can reproduce it. Is it possible for you to create an issue : Sign in to GitHub · GitHub
Thank you

Hello, must be my guest.
I found it was a problem with the portal sso. I don’t remember how and why I have commited in the nginx file the line include conf.d/;

and also sometime it have again this trouble, I have to delete cookies and datas on the web navigator and it comes back…

My problem is more related with the admin issue

I have also this issue with Gitea, also I have try install another Gitea instance and again can’t have admin page… Sorry, to related this, but it means is not only a Forgejo bug…

The bug is still here, for every raw view, not only images !!

I try install forgejo,
do a repository,
a group…(with 2 users)
add some files
add key ssh
git clone ssh
git pull
git add
git commit
git push

do an upgade with tesing branch
redo all processes,
it works nice +1

I just tested it and it works now, no problem anymore with the SSH access.

Thanks for fixing it and for all your work on the Forgejo app!

Yes, thanks @manal for all the job…