I just installed it. Awesome work ! Very nicely integrated with the SSO, this is just perfect !
I can successfully push with https.
As to ssh, I can see my ssh key in /home/gogs/.ssh/authorized_keys but I get Permission denied error for the moment. Is SSH supposed to work too ?
However, I’m running Yunohost on a VPS server, with only 512Mo RAM, and no swap (or at least, I cannot create a 1Go swap file). I had to hack the install script, using the binary package corresponding to my architecture.
in my /etc/ssh/sshd_config to enable ssh login with the gogs account.
Probably because the gogs user is created with the --disabled-login switch.
Otherwise you get in /var/log/auth.log :
Feb 10 11:52:35 ynh sshd[17386]: User gogs not allowed because account is locked
Feb 10 11:52:35 ynh sshd[17386]: input_userauth_request: invalid user gogs [preauth]
@tostaki I tried it (with a 1Go file). It seemed I didn’t have enough credentials to do so. A bit weird, but it wouldn’t be the first limitation I encounter with this VPS : (
I’ve updated the gogs package to the last released version. This major update use precompiled binary instead of building gogs from sources, because it’s so much easier and lighter. It also make use of yunohost helpers introduced in yunohost 2.4. Backup and restore are also fully functionnal.
Update from the old package is supported but please read the relevant section in the readme (tldr: backup).
Hello,
i’m instensivly using gogs through YNH in two differente YNH instance without any issue since more than a year !
go for it
for work : https://g-u-i.me/gogs
for school : https://esadhar.net/gogs
Is there a reason why Gogs is installed in /opt and not /var/www as all the other apps? Besides, what is the use of the gogs home folder? I can understand the need of a gogs user but why the home folder alongside actual users’ home folder?
Not all apps are in /var/www, in fact some other official apps use /opt like searx. I prefer to reserve the use of /var/www to static and php site that can be served directly by nginx.
In fact, if I was the only one to decide, I would put most apps in /opt since /var should be reserved to “files which may change in size” as described in man hier. There are already a lot of things in /var while /opt is empty on a fresh install and is well suited for apps IMO “should contain add-on packages that contain static files.”
Gogs need a linux user for ssh usage and also store data (all git repository, user avatar, issues attachments). I found more practical to have all of this in the same folder. I could have used /home/yunohost.app/gogs but I think using the standard /home/gogs makes it clearer to see that gogs is a real user with ssh access (limited to git) and data.
It makes great sense. Also, I agree with you about /opt and in this context it is very consistent.
Unless it appears in the YunoHost app packaging rules, it falls to people who pack the apps to use the proper directory, according to the filesystem hierarchy standard, I guess.