# Forgejo packaging V2 : test

**URL:** <https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899>\
**Category:** Contribute Room\
**Tags:** english\
**Created:** [May 27, 2023, 4:40pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899 "2023-05-27T16:40:55Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![manal](https://forum.yunohost.org/user_avatar/forum.yunohost.org/manal/32/6715_2.png) [@manal](https://forum.yunohost.org/u/manal)\
**Post date:** [June 4, 2023, 8:53am UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/21 "2023-06-04T08:53:52Z")

</div>

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](https://github.com/YunoHost-Apps/forgejo_ynh/issues/33)  
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

---

<div class="post-metadata">

**Author:** ![aris](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aris/32/7234_2.png) [@aris](https://forum.yunohost.org/u/aris)\
**Post date:** [June 4, 2023, 2:55pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/22 "2023-06-04T14:55:34Z")

</div>

Hello,

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

---

<div class="post-metadata">

**Author:** ![manal](https://forum.yunohost.org/user_avatar/forum.yunohost.org/manal/32/6715_2.png) [@manal](https://forum.yunohost.org/u/manal)\
**Post date:** [June 7, 2023, 9:49am UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/23 "2023-06-07T09:49:16Z")

</div>

Thank you for your time @aris

---

<div class="post-metadata">

**Author:** ![manal](https://forum.yunohost.org/user_avatar/forum.yunohost.org/manal/32/6715_2.png) [@manal](https://forum.yunohost.org/u/manal)\
**Post date:** [June 7, 2023, 9:55am UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/24 "2023-06-07T09:55:33Z")

</div>

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

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 😘

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

---

<div class="post-metadata">

**Author:** ![manal](https://forum.yunohost.org/user_avatar/forum.yunohost.org/manal/32/6715_2.png) [@manal](https://forum.yunohost.org/u/manal)\
**Post date:** [June 7, 2023, 12:56pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/25 "2023-06-07T12:56:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ericg](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ericg/32/1543_2.png) [@ericg](https://forum.yunohost.org/u/ericg)\
**Post date:** [June 7, 2023, 1:21pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/26 "2023-06-07T13:21:17Z")

</div>

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

> **[App resources | Yunohost Documentation](https://yunohost.org/fr/packaging_apps_resources#system-user)**
>
> Yunohost Documentation

---

<div class="post-metadata">

**Author:** ![manal](https://forum.yunohost.org/user_avatar/forum.yunohost.org/manal/32/6715_2.png) [@manal](https://forum.yunohost.org/u/manal)\
**Post date:** [June 7, 2023, 5:29pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/27 "2023-06-07T17:29:42Z")

</div>

@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/yunohost.app/forgejo`)
- 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/yunohost.app/forgejo`) 😱. 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/yunohost.app/forgejo`. 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.

---

<div class="post-metadata">

**Author:** ![manal](https://forum.yunohost.org/user_avatar/forum.yunohost.org/manal/32/6715_2.png) [@manal](https://forum.yunohost.org/u/manal)\
**Post date:** [June 7, 2023, 5:35pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/28 "2023-06-07T17:35:14Z")

</div>

@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)

---

<div class="post-metadata">

**Author:** ![manal](https://forum.yunohost.org/user_avatar/forum.yunohost.org/manal/32/6715_2.png) [@manal](https://forum.yunohost.org/u/manal)\
**Post date:** [June 7, 2023, 5:40pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/29 "2023-06-07T17:40:10Z")

</div>

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](https://github.com/YunoHost-Apps/forgejo_ynh/issues/new)  
Thank you

---

<div class="post-metadata">

**Author:** ![rodinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/rodinux/32/7029_2.png) [@rodinux](https://forum.yunohost.org/u/rodinux)\
**Post date:** [June 7, 2023, 6:07pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/30 "2023-06-07T18:07:01Z")

</div>

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/yunohost_panel.conf.inc;`

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

---

<div class="post-metadata">

**Author:** ![rodinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/rodinux/32/7029_2.png) [@rodinux](https://forum.yunohost.org/u/rodinux)\
**Post date:** [June 7, 2023, 6:12pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/31 "2023-06-07T18:12:26Z")

</div>

My problem is more related with the admin issue

> [@manal](#):
>
> 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](https://github.com/YunoHost-Apps/forgejo_ynh/issues/33)  
> 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.

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…

---

<div class="post-metadata">

**Author:** ![rodinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/rodinux/32/7029_2.png) [@rodinux](https://forum.yunohost.org/u/rodinux)\
**Post date:** [June 7, 2023, 6:38pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/32 "2023-06-07T18:38:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rodinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/rodinux/32/7029_2.png) [@rodinux](https://forum.yunohost.org/u/rodinux)\
**Post date:** [June 7, 2023, 7:08pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/33 "2023-06-07T19:08:51Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![snm](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@snm](https://forum.yunohost.org/u/snm)\
**Post date:** [June 7, 2023, 7:48pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/34 "2023-06-07T19:48:10Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![rodinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/rodinux/32/7029_2.png) [@rodinux](https://forum.yunohost.org/u/rodinux)\
**Post date:** [June 7, 2023, 8:13pm UTC](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899/35 "2023-06-07T20:13:49Z")

</div>

Yes, thanks @manal for all the job…

[Previous page](https://forum.yunohost.org/t/forgejo-packaging-v2-test/24899.md?page=1)
