Giter VIP home page Giter VIP logo

gogs_ynh's Introduction

Gogs for YunoHost

Integration level Working status Maintenance status

Install Gogs with YunoHost

Read this README is other languages.

This package allows you to install Gogs quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult the guide to learn how to install it.

Overview

Gogs (Go Git Service) is a git-based multiplatform forge written in Go. Its particularity is that it is light and can run on an ARM card, which makes it suitable for self-hosting. Gogs has a web interface similar to that of GitHub.

Features

  • User dashboard, user profile and activity timeline.
  • Repository and organization webhooks, including Slack, Discord and Dingtalk.
  • Repository Git hooks, deploy keys and Git LFS.
  • Repository issues, pull requests, wiki, protected branches and collaboration.
  • Migrate and mirror repositories with wiki from other code hosts.
  • Web editor for quick editing repository files and wiki.
  • Jupyter Notebook and PDF rendering.
  • Authentication via SMTP, LDAP.

Shipped version: 0.13.0~ynh3

Demo: https://try.gogs.io/user/login

Screenshots

Screenshot of Gogs

Documentation and resources

Developer info

Please send your pull request to the testing branch.

To try the testing branch, please proceed like that:

sudo yunohost app install https://github.com/YunoHost-Apps/gogs_ynh/tree/testing --debug
or
sudo yunohost app upgrade gogs -u https://github.com/YunoHost-Apps/gogs_ynh/tree/testing --debug

More info regarding app packaging: https://yunohost.org/packaging_apps

gogs_ynh's People

Contributors

alexaubin avatar ericgaspar avatar josue-t avatar m5oul avatar mbugeia avatar nicolaspetton avatar rafi594 avatar tituspijean avatar yalh76 avatar yunohost-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gogs_ynh's Issues

Many requests from outside

I have many logs which looks like there is many requests:

  • /var/log/gogs/gogs.log:
2017/03/11 08:28:42 [TRACE] Template: status/404
2017/03/11 08:28:53 [TRACE] Session ID: 9bcc1af9ef618fb4
2017/03/11 08:28:53 [TRACE] CSRF Token: lffz4XU9xZiXdhzFKxal_9jeIM46MTQ4OTIxNzMzMzQ5NjQ2OTg1Mg==
2017/03/11 08:28:53 [TRACE] Template: status/404
2017/03/11 08:29:03 [TRACE] Session ID: 56ced370bcbbbb1a
2017/03/11 08:29:03 [TRACE] CSRF Token: OrW4Fug-7cvOnaxabQVc9bEc9h46MTQ4OTIxNzM0Mzk4MTYyMzI5MA==
2017/03/11 08:29:04 [TRACE] Template: status/404
2017/03/11 08:29:09 [TRACE] Session ID: 6aea6448471f54cf
2017/03/11 08:29:09 [TRACE] CSRF Token: CTQ2O0Ditwu-0FsejViuUqUBAvM6MTQ4OTIxNzM0OTQ1MzI0MjU5MA==
  • /var/log/syslog:
Mar 11 08:27:47 moul gogs[1722]: [Macaron] 2017-03-11 08:27:47: Completed GET /42/21sh/commits/10f1569698122a6e242069e5c84182737c00b276/libft/get_next_line.h?lang=zh-CN
 302 Found in 668.227µs
Mar 11 08:27:47 moul gogs[1722]: [Macaron] 2017-03-11 08:27:47: Started GET /42/21sh/src/77d65a141787584a4151c3604903970ab760b2d8/libft/src/ft_strchr.c for 127.0.0.1
Mar 11 08:27:47 moul gogs[1722]: [Macaron] 2017-03-11 08:27:47: Completed GET /42/21sh/src/77d65a141787584a4151c3604903970ab760b2d8/libft/src/ft_strchr.c 404 Not Found 
in 32.453658ms
Mar 11 08:27:48 moul gogs[1722]: [Macaron] 2017-03-11 08:27:48: Started GET /42/21sh/src/f46452d11b650f1ae40860c147ca7fca11613e56/libft/src/ft_strncpy.c for [::1]
Mar 11 08:27:48 moul gogs[1722]: [Macaron] 2017-03-11 08:27:48: Completed GET /42/21sh/src/f46452d11b650f1ae40860c147ca7fca11613e56/libft/src/ft_strncpy.c 404 Not Found
 in 34.757889ms
Mar 11 08:27:48 moul gogs[1722]: [Macaron] 2017-03-11 08:27:48: Started GET /42/21sh/src/a709f14d8e91eea7081997622ad83a2c8c741560/libft/src/ft_strncpy.c for 127.0.0.1
Mar 11 08:27:48 moul gogs[1722]: [Macaron] 2017-03-11 08:27:48: Completed GET /42/21sh/src/a709f14d8e91eea7081997622ad83a2c8c741560/libft/src/ft_strncpy.c 404 Not Found
 in 69.764452ms
Mar 11 08:27:49 moul gogs[1722]: [Macaron] 2017-03-11 08:27:49: Started GET /42/21sh/src/572392ae46148e4d275543950762cf28d4166607/libft/src/ft_strchr.c for [::1]
Mar 11 08:27:49 moul gogs[1722]: [Macaron] 2017-03-11 08:27:49: Completed GET /42/21sh/src/572392ae46148e4d275543950762cf28d4166607/libft/src/ft_strchr.c 404 Not Found 
in 36.71086ms
Mar 11 08:27:50 moul gogs[1722]: [Macaron] 2017-03-11 08:27:50: Started GET /42/21sh/src/0beedc857492b8a4b4238545ef09fe0cd8f134b5/libft/src/ft_strncpy.c for 127.0.0.1
Mar 11 08:27:50 moul gogs[1722]: [Macaron] 2017-03-11 08:27:50: Completed GET /42/21sh/src/0beedc857492b8a4b4238545ef09fe0cd8f134b5/libft/src/ft_strncpy.c 404 Not Found
 in 37.875185ms

I decided to put my gogs instance under SSOwat protected_uris instead of unprotected_uris.
With this protection, there is no more such requests.

Error 500 on install

Hi,

After installation (with no error) I'am running into a error 500. This is either with private and public install.

Logs from sudo journalctl -u gogs.service

Other logs from gogs.log http.log xorm.log don't give useful information.

private mode does not work

If I choose to be not public, then accessing the page while loggued in the sso gets me a blank page (with a 500 Internal Error in the logs).

just switching to public, and running an upgrade, and it works.

I guess the private mode has an issue (no idea why)

Error 500 when authentificated after install of v0.9.97

On a fresh yunohost install, install work fine but when trying to access the page we have a 500 error.

journalctl -u gogs.service

Oct 16 20:37:48 yunohost-dev systemd[1]: Started Gogs (Go Git Service).
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [T] Custom path: /opt/gogs/custom
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [T] Log path: /var/log/gogs
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Gogs: Go Git Service 0.9.97.0901
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Log Mode: File(Warn)
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Cache Service Enabled
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Session Service Enabled
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Mail Service Enabled
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Git Version: 2.1.4
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] SQLite3 Supported
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Run Mode: Production
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [T] Doing: CheckRepoStats
Oct 16 20:37:48 yunohost-dev gogs[3604]: 2016/10/16 20:37:48 [I] Listen: http://0.0.0.0:6000/gogs
Oct 16 20:38:01 yunohost-dev gogs[3604]: [Macaron] 2016-10-16 20:38:01: Started GET / for 127.0.0.1
Oct 16 20:38:01 yunohost-dev gogs[3604]: [Macaron] PANIC: runtime error: invalid memory address or nil pointer dereference
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/panic.go:458 (0x434743)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/panic.go:62 (0x43329d)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/sigpanic_unix.go:24 (0x449644)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/gogits/gogs/models/login_source.go:491 (0x5609a9)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/gogits/gogs/models/login_source.go:549 (0x560fbd)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/gogits/gogs/modules/auth/auth.go:129 (0x803531)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/gogits/gogs/modules/context/context.go:165 (0x84daf2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/asm_amd64.s:481 (0x4646b6)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:434 (0x4f6148)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:302 (0x4f5a64)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:177 (0xb1a2f3)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:137 (0xb19cb2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/context.go:113 (0x7e33f2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/context.go:104 (0x7e3316)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/session/session.go:186 (0x74d665)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/asm_amd64.s:479 (0x46453c)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:434 (0x4f6148)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:302 (0x4f5a64)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:177 (0xb1a2f3)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:137 (0xb19cb2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/context.go:113 (0x7e33f2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/context.go:104 (0x7e3316)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/recovery.go:161 (0x7f642b)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/asm_amd64.s:479 (0x46453c)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:434 (0x4f6148)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:302 (0x4f5a64)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:177 (0xb1a2f3)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:137 (0xb19cb2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/context.go:113 (0x7e33f2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/context.go:104 (0x7e3316)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/logger.go:43 (0x7f55fe)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/asm_amd64.s:479 (0x46453c)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:434 (0x4f6148)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/reflect/value.go:302 (0x4f5a64)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:177 (0xb1a2f3)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/github.com/go-macaron/inject/inject.go:137 (0xb19cb2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/context.go:113 (0x7e33f2)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/router.go:184 (0x7f77bc)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/router.go:286 (0x7ef98e)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /home/vagrant/gopath/src/gopkg.in/macaron.v1/macaron.go:177 (0x7e7cab)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/net/http/server.go:2202 (0x70144d)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/net/http/server.go:1579 (0x6fde57)
Oct 16 20:38:01 yunohost-dev gogs[3604]: /usr/local/go/src/runtime/asm_amd64.s:2086 (0x4670a1)

curl -L http://127.0.0.1:6000 works fine

An install of gogs v0.9.97 then upgrade to 0.9.97 works fine too.

Add check process

We could force level 4 (which is done manually) as LDAP integration is implemented.

Trying to install - app has no manifest.json (?)

Hi,
When trying to install this app, I have a "No manifest.json file", for CLI as well as Web Interface.
But you have in the repository. Is it an issue of manifest formatting ?

Tested on Yunohost 2.4 / Debian 8

Cloning a repo - http doesn't work, ssh key neither

Hi,
I'm trying to clone my gogs repository.
Using http I have this kind of error: fatal: mydomain.tld/gogs/myself/Test.git/info/refs not valid: is this a git repository?

And when trying using ssh, it ask for a password - but I can't find which one, as my login password doesn't work.
Adding an ssh key to the repo doesn't solve the issue.
Do you know how to correct that ? Is it an installation issue ?

Thanks :)

Backup from ARM and restore on 64bits

The binary for ARM is backup and do not works on 64bits processor architecture:

./gogs web
-bash: ./gogs: cannot execute binary file: Exec format error

I tried an upgrade, and get these errors:

gogs@moul:/opt/gogs$ ./gogs web
2017/09/27 14:28:53 [TRACE] Custom path: /opt/gogs/custom
2017/09/27 14:28:53 [TRACE] Log path: /var/log/gogs
2017/09/27 14:28:53 [TRACE] Log Mode: File (Trace)
2017/09/27 14:28:53 [ INFO] Gogs: Go Git Service 0.11.0.0403
panic: template: user/auth/login:31: function "AppSubURL" not defined

goroutine 1 [running]:
html/template.Must(0x0, 0x16e7e60, 0xc4207b9820, 0x0)
	/usr/local/go/src/html/template/template.go:360 +0x54
github.com/gogits/gogs/vendor/gopkg.in/macaron%2ev1.compile(0xc420500640, 0x13, 0xc4204ab840, 0x1, 0x1, 0x0, 0x0, 0xc420500680, 0x2, 0x2, ...)
	/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/render.go:292 +0x4cc
github.com/gogits/gogs/vendor/gopkg.in/macaron%2ev1.(*TemplateSet).Set(0xc420510390, 0xf42185, 0x7, 0xc420480e10, 0x0)
	/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/render.go:318 +0x63
github.com/gogits/gogs/vendor/gopkg.in/macaron%2ev1.renderHandler(0xc420500640, 0x13, 0xc4204ab840, 0x1, 0x1, 0x0, 0x0, 0xc420500680, 0x2, 0x2, ...)
	/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/render.go:385 +0x18d
github.com/gogits/gogs/vendor/gopkg.in/macaron%2ev1.Renderer(0xc4201811e8, 0x1, 0x1, 0xa, 0x1)
	/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/render.go:422 +0x172
github.com/gogits/gogs/cmd.newMacaron(0xc42037fcc0)
	/home/vagrant/gopath/src/github.com/gogits/gogs/cmd/web.go:110 +0x5cf
github.com/gogits/gogs/cmd.runWeb(0xc42037fcc0, 0x0, 0xc42037fcc0)
	/home/vagrant/gopath/src/github.com/gogits/gogs/cmd/web.go:166 +0x74
github.com/gogits/gogs/vendor/github.com/urfave/cli.HandleAction(0xe26e20, 0xf846d0, 0xc42037fcc0, 0xc420386a00, 0x0)
	/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/urfave/cli/app.go:483 +0xb9
github.com/gogits/gogs/vendor/github.com/urfave/cli.Command.Run(0xf3d71a, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf50e4d, 0x10, 0x0, ...)
	/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/urfave/cli/command.go:193 +0xb72
github.com/gogits/gogs/vendor/github.com/urfave/cli.(*App).Run(0xc4200f3860, 0xc42000c140, 0x2, 0x2, 0x0, 0x0)
	/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/urfave/cli/app.go:250 +0x7d0
main.main()
	/home/vagrant/gopath/src/github.com/gogits/gogs/gogs.go:41 +0x3ea
tail -f /var/log/gogs/gogs.log 
2017/09/27 14:28:53 [TRACE] Log Mode: File (Trace)
2017/09/27 14:28:53 [ INFO] Gogs: Go Git Service 0.11.0.0403
2017/09/27 14:28:53 [ INFO] Cache Service Enabled
2017/09/27 14:28:53 [ INFO] Session Service Enabled
2017/09/27 14:28:53 [ INFO] Mail Service Enabled
2017/09/27 14:28:53 [ INFO] Notify Mail Service Enabled
2017/09/27 14:28:53 [ INFO] Git Version: 2.1.4
2017/09/27 14:28:53 [ INFO] SQLite3 Supported
2017/09/27 14:28:53 [ INFO] Run Mode: Production
2017/09/27 14:28:53 [TRACE] Doing: CheckRepoStats

Upgrade issue

Hi all !

I have an issue while upgrading:

# LANG=C && yunohost app upgrade -u https://github.com/YunoHost-Apps/gogs_ynh gogs
Warning: mv: cannot stat '/home/yunohost.app/gogs/*': No such file or directory
Error: Unable to upgrade gogs
Error: No app to upgrade

I'm under Gogs Version: 0.9.71.0809 previously updated using the script.

Thanks !

Léo

Error Redirect

Hi,
i'm install the apps without not problem ; but i can use the service, i'm try to clone a repo with a Https and SSH way but all solution give an error.

Https Method:
fatal: unable to update url base from redirection:
asked for: https://code.stilobique.com/gogs/stilobique/UE4_Try.git/info/refs?service=git-receive-pack
redirect: https://stilobique.com/yunohost/sso/?r=aHR0cHM6Ly9jb2RlLnN0aWxvYmlxdWUuY29tL2dvZ3Mvc3RpbG9iaXF1ZS9VRTRfVHJ5LmdpdC9pbmZvL3JlZnM/c2VydmljZT1naXQtcmVjZWl2ZS1wYWNr

SSH Method:
fatal: Could not read from remote repository.

With the SSH way, maybe i don't correctly setup the config (i need to check with your readme information), but why the https way don't work ?
I can give more information if needed.
Quickly > Yunohost 2.7.9 ; and use a subdomain.

500 error, not sure how to fix

I think it has something to do with the LDAP or user sign in. When a user is signed in to yunohost it shows a 500 error and does not load. When you're not signed in it works fine. Also, when you try to sign via the gogs site it gives a 500 error on any username/password, even wrong ones. Could it be not connecting to the ldap server?

I tried to find logs but the only thing I could find is with journalctl and it was just gogs saying it had a 500 error, no other information.

Can not clone with SSH: AllowGroups

When I use git pull with an SSH remote url, it fails with the following error in /var/log/auth.log

User gogs from 195.132.55.251 not allowed because none of user's groups are listed in AllowGroups

To be able to use SSH interaction, I had to add gogs in the AllowGroups.

I edited the file: /etc/ssh/sshd_config

With the following line:

AllowGroups ssh.main sftp.main ssh.app sftp.app admins root gogs

Now I don't have the error anymore but there is another problem coming, that I will state in another issue.

ARM build changed pattern name

wget https://github.com/gogits/gogs/releases/download/v0.9.141/linux_arm.zip failed.

It's now linux_armv5.zip and linux_armv6.zip

I don't think this builds works on armv7 architectures used on InternetCube, Rasp and other ARM boards.

[Maintenance ping] Is this app still maintained ?

Hello !

This is a friendly automatic notice from the Yunohost Apps team : our tool noticed that this app is listed in the community/official app lists - but this app appears to be inactive.

Hence, this issue was created automatically to check if this app is still actively maintained.

You are the current maintainer ? 👷‍♂️ 👷‍♀️

You still actively maintain this app ? 🎉

Please close this issue to signify that you still actively maintain this app. Nothing else, and thank you for your work ❤️ !

You don't intend to maintain this app anymore ? 😢

Either don't do anything, or add a comment to explicitly state that you do not intend / have time / ... to maintain this app (but thanks for your work so far ! 😘). After 15 days, if this issue is still opened, the app will be considered unmaintained.

You wish to become the new maintainer of this app ? 😄

You are welcome and free to comment in this thread that you wish to become the new maintainer, and/or to create the corresponding pull request to fix this issue ! (If you do not already have commit rights on this repo, we can then arrange things with the rest of the app team. 😉) Once this issue is closed, the app will then be flagged again as maintained !

upgrade didn't works

+ DESTDIR=/opt/gogs
+ REPO_PATH=/home/gogs/repositories
+ DATA_PATH=/home/gogs/data
+ '[' -d /etc/gogs ']'
+ sudo mkdir -p /home/gogs/repositories
++ ynh_app_setting_get gogs repopath
++ sudo yunohost app setting gogs repopath --output-as plain --quiet
+ old_repo_path=
+ sudo mv '/home/yunohost.app/gogs/*' /home/gogs/repositories
Warning: mv: cannot stat ‘/home/yunohost.app/gogs/*’: No such file or directory
Error: Unable to upgrade gogs
Error: No app to upgrade

Commit is not up to date in the community.json

Hellow,

I found that the commit on community.json is outdated, hence people installing the app via this list won't benefit from the last upgrades / improvements ...

Please create a PR to update it on the list (I do not maintain this app so it's not relevant for me to do it and it might be refused...)

ProTip™ : possibly you can now set the commit to 'HEAD', to use the latest commit of master automatically in the future. If you do this, it is strongly recommended to use a 'testing' branch for changes that are not deemed stable yet.

Add rsync

Hello,

There is a missing depend for rsync command.

Here, my install log on error :

sudo: rsync: command not found
sudo rsync -a /tmp/tmp.V0nqWkV2B0/gogs/LICENSE /tmp/tmp.V0nqWkV2B0/gogs/README.md /tmp/tmp.V0nqWkV2B0/gogs/README_ZH.md /tmp/tmp.V0nqWkV2B0/gogs/gogs /tmp/tmp.V0nqWkV2B0/gogs/public /tmp/tmp.V0nqWkV2B0/gogs/scripts /tmp/tmp.V0nqWkV2B0/gogs/templates /opt/gogs
+ unzip -q /tmp/gogs.zip -d /tmp/tmp.V0nqWkV2B0
+ wget -q -O /tmp/gogs.zip https://github.com/gogits/gogs/releases/download/v0.11/raspi2_armv6.zip
+ rm -f /tmp/gogs.zip
+ gogs_tarball=/tmp/gogs.zip
+ local TMPDIR=/tmp/tmp.V0nqWkV2B0
++ mktemp -d
+ local DESTDIR=/opt/gogs
+ extract_gogs /opt/gogs
+ sudo chown -R gogs:gogs /home/gogs /var/log/gogs
+ sudo mkdir -p /opt/gogs/custom/conf /home/gogs/repositories /home/gogs/data/avatars /home/gogs/data/avatars /home/gogs/data/attachments /var/log/gogs
+ DATA_PATH=/home/gogs/data
+ REPO_PATH=/home/gogs/repositories
+ sudo adduser gogs --ingroup gogs --system --quiet --shell /bin/bash
+ id -u gogs
+ sudo addgroup gogs --system --quiet
+ id -g gogs
+ sudo yunohost app setting gogs secret_key -v No --quiet
+ ynh_app_setting_set gogs secret_key No
+ sudo yunohost app setting gogs is_public -v No --quiet
+ ynh_app_setting_set gogs is_public No
+ sudo yunohost app setting gogs adminusername -v aymeric --quiet
+ ynh_app_setting_set gogs adminusername aymeric
+ sudo yunohost app setting gogs mysqlpwd -v Itia7ZdEsd1yQTyIp1QR6MzR --quiet
+ ynh_app_setting_set gogs mysqlpwd Itia7ZdEsd1yQTyIp1QR6MzR
+ mysql -u root '--password=qce]xkz1uJ' -B ''
+ ynh_mysql_connect_as root 'qce]xkz1uJ' ''
++ sudo cat /etc/yunohost/mysql
+ ynh_mysql_execute_as_root 'CREATE DATABASE gogs; GRANT ALL PRIVILEGES ON gogs.* TO '\''gogs'\''@'\''localhost'\'' IDENTIFIED BY '\''Itia7ZdEsd1yQTyIp1QR6MzR'\'' WITH GRANT OPTION;'
+ sql+=' WITH GRANT OPTION;'
+ sql+=' IDENTIFIED BY '\''Itia7ZdEsd1yQTyIp1QR6MzR'\'''
+ [[ -n Itia7ZdEsd1yQTyIp1QR6MzR ]]
+ sql+=' GRANT ALL PRIVILEGES ON gogs.* TO '\''gogs'\''@'\''localhost'\'''
+ [[ 3 -gt 1 ]]
+ sql='CREATE DATABASE gogs;'
+ db=gogs
+ ynh_mysql_create_db gogs gogs Itia7ZdEsd1yQTyIp1QR6MzR
+ key=8l9eN5zskNWQwu4hYcOMOnYW
++ tr -c -d A-Za-z0-9
++ sed -n 's/\(.\{24\}\).*/\1/p'
++ dd if=/dev/urandom bs=1 count=200
++ ynh_string_random
+ dbpass=Itia7ZdEsd1yQTyIp1QR6MzR
++ tr -c -d A-Za-z0-9
++ sed -n 's/\(.\{24\}\).*/\1/p'
++ dd if=/dev/urandom bs=1 count=200
++ ynh_string_random
+ [[ -d /opt/gogs ]]
+ DESTDIR=/opt/gogs
+ grep -q '"username": "aymeric"'
+ sudo yunohost user list --output-as json
+ ynh_user_exists aymeric
+ sudo yunohost app checkurl domainelibre.fr/gogs -a gogs
++ . /usr/share/yunohost/helpers.d/utils
++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ . /usr/share/yunohost/helpers.d/user
++ '[' -r /usr/share/yunohost/helpers.d/user ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ . /usr/share/yunohost/helpers.d/string
++ '[' -r /usr/share/yunohost/helpers.d/string ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ . /usr/share/yunohost/helpers.d/setting
++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ . /usr/share/yunohost/helpers.d/print
++ '[' -r /usr/share/yunohost/helpers.d/print ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ . /usr/share/yunohost/helpers.d/package
++ '[' -r /usr/share/yunohost/helpers.d/package ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
+++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
++ . /usr/share/yunohost/helpers.d/mysql
++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ . /usr/share/yunohost/helpers.d/ip
++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
+++ CAN_BIND=1
++ . /usr/share/yunohost/helpers.d/filesystem
++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
+++ run-parts --list /usr/share/yunohost/helpers.d
+ source /usr/share/yunohost/helpers
+ dbuser=gogs
+ dbname=gogs
+ app=gogs
++ GOGS_BINARY_URL=https://github.com/gogits/gogs/releases/download/v0.11/raspi2_armv6.zip
++ ARCHITECTURE=raspi2_armv6
++ '[' -n armv7l ']'
+++ grep arm
+++ uname -m
++ '[' -n '' ']'
+++ grep 86
+++ uname -m
++ '[' -n '' ']'
+++ grep 64
+++ uname -m
++ VERSION=0.11
++ APPNAME=gogs
+ source ./_common.sh
+ is_public=No
+ admin=aymeric
+ path=/gogs
+ domain=domainelibre.fr
+ set -euo pipefail
Exécution du script « /var/cache/yunohost/from_file/gogs_ynh-master/scripts/install »...
Vérification des paquets requis...
Terminé
Extraction...
Téléchargement...

Cannot clone with SSH: wrong HOME env variable ?

I am trying to setup SSH connection to pull/push and clone.
After fixing the issue #77, I stumble over another issue.

The terminal asks for password even if I have given SSH key in gogs' interface.
I see the key in /home/yunohost_app/gogs/.ssh/authorized_keys.

The command ssh -vT gogs@<server> issues the following:

debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: /home/matthias/.ssh/id_rsa RSA SHA256:<key> agent
debug1: Will attempt key: /home/matthias/.ssh/id_ecdsa 
debug1: Will attempt key: /home/matthias/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /home/matthias/.ssh/id_ed25519 
debug1: Will attempt key: /home/matthias/.ssh/id_ed25519_sk 
debug1: Will attempt key: /home/matthias/.ssh/id_xmss 
debug1: Will attempt key: /home/matthias/.ssh/id_dsa 
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug1: SSH2_MSG_SERVICE_ACCEPT received
Debian GNU/Linux 11
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/matthias/.ssh/id_rsa RSA SHA256:<key> agent
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/matthias/.ssh/id_ecdsa
debug1: Trying private key: /home/matthias/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/matthias/.ssh/id_ed25519
debug1: Trying private key: /home/matthias/.ssh/id_ed25519_sk
debug1: Trying private key: /home/matthias/.ssh/id_xmss
debug1: Trying private key: /home/matthias/.ssh/id_dsa
debug1: Next authentication method: password
gogs@<server_name>'s password: 

After checking, it seems it does not find the correct file authorized_keys.

I added AuthorizedKeysFile %h/.ssh/authorized_keys in /etc/ssh/sshd_config as suggested in the doc of the app.

But still, I think the $HOME is not correctly put. Indeed I have the following:

root@mtbp:~# sudo -u gogs /bin/bash -l -c 'echo $HOME'
/var/www/gogs

I think this should point to /home/yunohost_app/gogs no ? How to fix this in the app ?

Thank you for your help.

Backup/restore issue

When backuping the system, without taking gogs into account, /home is automatically backuped.
Gogs' data are stored on /home/gogs/.
That's can be a problem.
On my case, I am mirorring a project which have many builds releases.
Those builds are around 1Gb.
Finally, I can't make works the backup/restore because of free memory space issue with 8Gb SD card.
Furthermore, compression/decompression of tarball is very slow.

Why did this folder was choosed? Why not using /home/yunohost.app/gogs?

Better documentation about clone/ssh

Following #8

Document:
HTTPS clone won't work in private mode (explain why) + info in manifest
SSH daemon configuration
How to correctly setup ssh / key / agent
What to check if it doesn't work

Cannot upgrade to version 0.12.3~ynh1

Describe the bug

When upgrading gogs from 0.11.66~ynh2 to 0.12.3~ynh1, the upgrade fails at step Setting up source files

Context

  • Hardware: VPS
  • YunoHost version: 4.3.4.2
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: *using: 0.11.66~ynh2 - trying to upgrade to: 0.12.3~ynh1

Steps to reproduce

yunohost app upgrade gogs

Logs

https://paste.yunohost.org/raw/inulikohit

The error seems to be here:

2021-12-20 12:37:52,725: DEBUG - + rm -rf /var/cache/yunohost/files_to_keep_during_setup_source/
2021-12-20 12:37:52,726: DEBUG - + '[' -n '/custom/conf/app.ini /custom/conf/auth.d/ldap.conf' ']'
2021-12-20 12:37:52,726: DEBUG - + '[' -e '' ']'
2021-12-20 12:37:52,726: DEBUG - + mkdir --parents ''
2021-12-20 12:37:52,727: WARNING - mkdir: impossible de créer le répertoire «  »: Aucun fichier ou dossier de ce type

Permission denied

After installation, I get the message below when I try to upload files:
"NewUpload: MkdirAll: mkdir/opt/gogs/data: permission denied"

How can I change this directory by /home/gogs/data for example?

Can't disconnect using the disconnect button of gogs

  1. Connect using sso of YunoHost
  2. Going to your Gogs instance: you're immediatly connected with your account
  3. Click on disconnect: see it doesn't disconnect you from Gogs and from sso of yunohost (it's the bug!)
  4. Going to yunohost and click on disconnect: it disconnects you from sso of yunohost and gogs (so this is ok)

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.