These are chat archives for go-gitea/gitea

2nd
Feb 2017
matrixbot
@matrixbot
Feb 02 2017 01:33
xj9 i'm setting up gitea using docker. do i need to overwrite app.ini or can i just set environment variables?
xj9 your docs are quite sparse on the subject: https://docs.gitea.io/en-us/install-with-docker/
Darren Bell
@KangoV
Feb 02 2017 01:36
i did not have to overwrite anything or set env vars
matrixbot
@matrixbot
Feb 02 2017 01:39
xj9 how did you change the settings?
xj9 kind of worthless if i can't configure the thing
Thomas Boerger
@tboerger
Feb 02 2017 06:17
@xj9 most settings are configured within the installer. And if you really need to change something else afterwards, the config is stored in a volume
Michael de Wit
@mjwwit
Feb 02 2017 07:10
@bkcsoft do you, by any chance, know why GitLab put everything into a single docker image for their CE images? It's a nice product, but that huge docker image is ridiculous. Please talk some sense into them :wink:
As for the monitoring, please don't lock it down to Prometheus only. There are other initiatives like InfluxDB and KairosDB that deserve support as well
Bwko
@Bwko
Feb 02 2017 07:44
@mark_larah_twitter Local imports are disabled by default, to enable it set IMPORT_LOCAL_PATHS to true
Thomas Boerger
@tboerger
Feb 02 2017 07:57
@mjwwit for same reason like the omnibus, simpler support.
Prometheus is at least for me the first step :)
Michael de Wit
@mjwwit
Feb 02 2017 08:03
I'm currently using it, but even after heavy tweaking it's eating up all my memory... I still have to finish my InfluxDB setup to see if that's any better
Jorrit Klein Bramel
@drsect0r
Feb 02 2017 08:38
@tboerger @bkcsoft thanks guys, awesome work!
Thomas Boerger
@tboerger
Feb 02 2017 08:39
@mjwwit but that’s configurable :)
Michael de Wit
@mjwwit
Feb 02 2017 08:42
I tried, followed https://prometheus.io/docs/operating/storage/ to try and get memory usage down to a reasonable amount
didn't work
I think it's because you can't force prometheus to limit its usage. It will try to stay under the configured limit, but it will just go over if it can't
but maybe it's just me, idk
Thomas Boerger
@tboerger
Feb 02 2017 08:53
and i know peaople like @metalmatze that use prometheus massively.
Michael de Wit
@mjwwit
Feb 02 2017 09:02
I'm not saying you shouldn't use it. I'm convinced that it's one of the better TSDB options out there, and it's a good choice to start with. I'm just saying we shouldn't lock it down to just prometheus
keeping an open mind during the integration of prometheus support will greatly reduce the effort required to support other TSDBs in the future
Thomas Boerger
@tboerger
Feb 02 2017 09:06
:+1:
Michael de Wit
@mjwwit
Feb 02 2017 09:21
anyone got time to review my PR? go-gitea/gitea#803
if you have a configured instance it should be rather simple to test
Matthias Loibl
@metalmatze
Feb 02 2017 10:15
Well. Docker, Kubernetes and gitlab all support Prometheus now out of the box.
Memory is an issue, but there are ways to configure it to be pretty efficient.
Michael de Wit
@mjwwit
Feb 02 2017 10:18
Docker supports it out-of-the-box? I thought you still needed a reporter like cAdvisor..
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 13:04
@mjwwit they use a single image for ease of deployment. As for monitoring, we might support others as well, but we're gonna start shipping GitLab with prometheus built-in
Michael de Wit
@mjwwit
Feb 02 2017 13:17
it's not the Docker way of doing things though... And deploying multiple containers is still quite easy with docker-compose
Thomas Boerger
@tboerger
Feb 02 2017 13:30
but docker-compose is at least for me not a production deployment way… it’s fine for local testing but that’s it
Michael de Wit
@mjwwit
Feb 02 2017 13:34
but some other (but similar) file/binary will be, depending on which orchestrator is used
docker-compose can be used when running a swarm cluster
k8s has it's own thing
mesos probably has a very similar concept as wel
you're not gonna tell me you run a complex service structure using the docker CLI, that would be insane
Willem van Dreumel
@willemvd
Feb 02 2017 13:42
Schermafbeelding 2017-02-02 om 14.36.36.png
finally got a better sign in layout ;)
for go-gitea/gitea#679
Lunny Xiao
@lunny
Feb 02 2017 13:43
:+1:
Michael de Wit
@mjwwit
Feb 02 2017 13:45
@willemvd Love it! Nice work! :100:
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 13:48
:100:
Thomas Boerger
@tboerger
Feb 02 2017 13:57
@mjwwit i just say that i don’t like compose… especially as long as it’s written in python :)
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 13:58
lol
nothing wrong with python :P
Thomas Boerger
@tboerger
Feb 02 2017 13:58
i don’t like python. go, ruby and bash are the only real languages :P
Michael de Wit
@mjwwit
Feb 02 2017 13:58
@tboerger you have a point, but as GitLab is written in Ruby they're fucked anyway, so why not add python as well :joy:
Thomas Boerger
@tboerger
Feb 02 2017 13:59
see above :D
Michael de Wit
@mjwwit
Feb 02 2017 13:59
what are you smoking man? lol
Thomas Boerger
@tboerger
Feb 02 2017 13:59
too much lol
Michael de Wit
@mjwwit
Feb 02 2017 13:59
ruby is not as bad as PHP, but it's not very far away either
Thomas Boerger
@tboerger
Feb 02 2017 13:59
ruby and python is like vim and emacs.
i did years of ruby development
Michael de Wit
@mjwwit
Feb 02 2017 14:00
I did years of php development
it left me scarred for life
Thomas Boerger
@tboerger
Feb 02 2017 14:00
and now i’m working for a php company…. lol
Michael de Wit
@mjwwit
Feb 02 2017 14:00
ouch
Thomas Boerger
@tboerger
Feb 02 2017 14:00
i did years of php development as well… php 3.x until 5.1
Michael de Wit
@mjwwit
Feb 02 2017 14:01
I dropped out after 5.4
Thomas Boerger
@tboerger
Feb 02 2017 14:01
but i’m not doing php anymore. mostly go and bash, from time to time some ruby.
Michael de Wit
@mjwwit
Feb 02 2017 14:02
I switched to JavaScript, which was quite bad but is getting better fast
Thomas Boerger
@tboerger
Feb 02 2017 14:02
i started with php 1998… damn, 19 years ago -.-
i’m getting old xD
Willem van Dreumel
@willemvd
Feb 02 2017 14:03
:) with just 1 image and 3 lines in code I’ve added google+ oauth as well :P
Michael de Wit
@mjwwit
Feb 02 2017 14:03
1998? I was still doing VB back then :joy:
Thomas Boerger
@tboerger
Feb 02 2017 14:03
@willemvd :+1:
Lunny Xiao
@lunny
Feb 02 2017 14:03
@willemvd :+1: it’s ready for review now?
Thomas Boerger
@tboerger
Feb 02 2017 14:03
@mjwwit that’s the time where i started web development stuff… with my modem :P
Michael de Wit
@mjwwit
Feb 02 2017 14:04
dial-up craziness
Thomas Boerger
@tboerger
Feb 02 2017 14:04
writing a guest book, or „news“ section for the shiny 90s website :D
Michael de Wit
@mjwwit
Feb 02 2017 14:04
with as much blink and marquee tags as you could scram in there
Willem van Dreumel
@willemvd
Feb 02 2017 14:04
@lunny 1 small fix todo
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:05
@willemvd might as well add another 3 lines for GitLab OAuth ;)
Willem van Dreumel
@willemvd
Feb 02 2017 14:05
hehe
see some new PR’s coming :P
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:05
but preferably those lines should be completely configurable :wink:
Willem van Dreumel
@willemvd
Feb 02 2017 14:06
hehe, that would be very nice, but it has to do with calling the right goth lib provider to get it into gitea
rest is configuration :)
most of them will fit into the current flow, some need additional setup (like openid-connect)
setup aka update of admin pages
-s
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:08
right, might wanna make models.OAuth2Providers a config in app.ini?
(or in /admin)
Willem van Dreumel
@willemvd
Feb 02 2017 14:09
models.OAuth2Providers is only the definition of what gitea supports (so that needs to be extended when there are new implementations done)
configuration of the oauth2 provider it self is up to the admin in the settings
so don’t think that putting models.OAuth2Providers in app.ini will do anything
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:18
I don't fully understand what Gitea needs to "support"?
OAuth is just url, client_id, client_secret, callback and done...
Thomas Boerger
@tboerger
Feb 02 2017 14:18
not exactly :)
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:18
yes, exactly :)
Lunny Xiao
@lunny
Feb 02 2017 14:18
@tboerger python is better than ruby. :smile:
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:18
^
Lunny Xiao
@lunny
Feb 02 2017 14:20
Because I don’t know Ruby but Python :smile:
@bkcsoft go-gitea/gitea#793 needs your confirm.
Willem van Dreumel
@willemvd
Feb 02 2017 14:21
goth has libraries for different providers and yes @bkcsoft you are right everything is based on those things, but to get user info addtional calls to user profile services needs to be done
Thomas Boerger
@tboerger
Feb 02 2017 14:22
@bkcsoft different providers act differently. that’s why all the oauth libs provide customizations for twitter, github and so on
Willem van Dreumel
@willemvd
Feb 02 2017 14:22
so different calls, different structures and so one
-e
Thomas Boerger
@tboerger
Feb 02 2017 14:22
https://github.com/markbates/goth/tree/master/providers these provides are not only jokes or fun :)
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:22
@tboerger right, which goth handles for us. Gitea doesn't have to have any special code for this though...
Thomas Boerger
@tboerger
Feb 02 2017 14:23
gitea need to import all the goth handlers… so gitea needs to support them :)
Willem van Dreumel
@willemvd
Feb 02 2017 14:23
@tboerger indeed
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:24
that is irritating :unamused:
Willem van Dreumel
@willemvd
Feb 02 2017 14:24
@bkcsoft that is why the admin page is limit to just a few fields
Schermafbeelding 2017-02-02 om 15.24.50.png
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:27
I see one issue with that screenshot... no way to use oauth from a self-hosted gitlab-instance?
Thomas Boerger
@tboerger
Feb 02 2017 14:27
@bkcsoft that’s how all the oauth2 libs work. we will also hopefully support some „generic“ type which can be used for custom oauth providers
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:27
(if gitlab is supported)
Willem van Dreumel
@willemvd
Feb 02 2017 14:27
gitlab is supported, but indeed with default urls:
AuthURL    = "https://gitlab.com/oauth/authorize"
TokenURL   = "https://gitlab.com/oauth/token"
ProfileURL = "https://gitlab.com/api/v3/user"
Lunny Xiao
@lunny
Feb 02 2017 14:28
Or let user change the default URL?
Thomas Boerger
@tboerger
Feb 02 2017 14:28
the default gitlab provider only works for gitlab.com https://github.com/markbates/goth/blob/master/providers/gitlab/gitlab.go
Willem van Dreumel
@willemvd
Feb 02 2017 14:28
so we can create some input fields and override these if one of them is filled
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:28
Can we make that
AuthURL    = "/oauth/authorize"
TokenURL   = "/oauth/token"
ProfileURL = "/api/v3/user"
BaseURL = "https://gitlab.com" // <-- configurable
Thomas Boerger
@tboerger
Feb 02 2017 14:29
but the generic provider should work for selfhosted gitlab
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:29
Maybe only use the generic one? and have the things configurable? :D
Willem van Dreumel
@willemvd
Feb 02 2017 14:29
generic provider will work for login , but not to get user info (goth also does that for all providers)
Thomas Boerger
@tboerger
Feb 02 2017 14:30
yeah, a generic one to have things configurable via the configuration web ui
Lunny Xiao
@lunny
Feb 02 2017 14:30
The PR could be splitted serval steps. For the first party, it could not support customized host.
I think. @willemvd
Thomas Boerger
@tboerger
Feb 02 2017 14:30
first step will be based on the predefined providers
next step will be additional config fields like the one for gitlan
Willem van Dreumel
@willemvd
Feb 02 2017 14:30
agree with @tboerger
Thomas Boerger
@tboerger
Feb 02 2017 14:30
next step will be generic provider entirely configurable
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:30
sure :)
Willem van Dreumel
@willemvd
Feb 02 2017 14:30
otherwise it will never end :P
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 14:31
As long as someone is thinking of it :D
Lunny Xiao
@lunny
Feb 02 2017 14:31
Yes. Let it merged ASAP. :smile: I can’t wait
Thomas Boerger
@tboerger
Feb 02 2017 14:31
and i really need to find the time to fix custom templates :)
Willem van Dreumel
@willemvd
Feb 02 2017 14:32
@lunny I will do some fixing first on updating provider config
Lunny Xiao
@lunny
Feb 02 2017 14:32
:+1:
Michael de Wit
@mjwwit
Feb 02 2017 14:39
@lunny about #803, where did you check the email body? It might be that the email actually has 2 bodies, one in HTML, the other in plain text. It looks like you saw the plain text one.
Lunny Xiao
@lunny
Feb 02 2017 14:40
I can forward the email to you. please private send me your email address.
Willem van Dreumel
@willemvd
Feb 02 2017 14:50
@lunny updated go-gitea/gitea#679 with the update config fix
so think now is the time to start testing :D
Lunny Xiao
@lunny
Feb 02 2017 14:50
OKay. I will test it tonight and tomorrow.
Willem van Dreumel
@willemvd
Feb 02 2017 14:51
:+1:
will be less available tomorrow, day off :)
so @willemvd me if you need assistence ;)
Lunny Xiao
@lunny
Feb 02 2017 14:53
OKay. :+1: thanks for your good job.
Willem van Dreumel
@willemvd
Feb 02 2017 14:58
np
Matthias Loibl
@metalmatze
Feb 02 2017 18:17

Hey! If you want to know why I was so quite the last month or so. We just published today another project I was very busy with.

https://www.justwatch.com/blog/post/announcing-gopass/
https://www.justwatch.com/gopass/
https://github.com/justwatchcom/gopass

Glad to get your feedback! :blush:

Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 19:12
@metalmatze Nice! :D Any reason you're using gpg instead of https://godoc.org/golang.org/x/crypto/openpgp
Matthias Loibl
@metalmatze
Feb 02 2017 19:27
Because we would need to handle the keyring on our own which is not something we wanted to do with version 1.
Kim "BKC" Carlbäcker
@bkcsoft
Feb 02 2017 19:50
ooh right
Sandro Santilli
@strk
Feb 02 2017 21:29
@willemvd: does the User.LoginType issue still remain ? (the distinction between account create via oauth2 or just linked to one)
Willem van Dreumel
@willemvd
Feb 02 2017 21:33
depends if you consider it as an issue :)
but no I haven’t changed that
I have builded it like discussed here, earlier I also stated that this was the way I was going to do that , nobody seems to have problems with that
and I think it is the right way btw, the original source of the account is OAuth2 , so when creating a new account based on that as orginal source, it looks good to me
Sandro Santilli
@strk
Feb 02 2017 21:40
can you "link" another OAuth provider to an OAuth provider initiated login ?
Sandro Santilli
@strk
Feb 02 2017 21:46
maybe I'm just missing the ability to see (as a user, in my "settings" page) which was my login type
Willem van Dreumel
@willemvd
Feb 02 2017 21:49
yes , by using the username and password used to create the first account
Sandro Santilli
@strk
Feb 02 2017 21:56
ah, right, now I remember you still ask for a username/password when creating the account
but if you register with a name/password your loginType is a different one
keeps puzzling me
basically your loginType says what you used as a LoginSource to register, more or less ?
or to.. auto-register maybe ? (because registration is always via "local" username/password)
or not, given username/password could be sent to a LDAP (not local) account checker
how would that work, if I enable LDAP and OAuth login sources ?
then I login via OAuth and I'm asked to either "link" or "register"
Sandro Santilli
@strk
Feb 02 2017 22:01
I decide to "link" against a (still unknown locally) LDAP account
so I enter user/password of the LDAP directory
and hit "connect"
what would loginType be se to, in that case ? (ok this is easy, loginType would be LDAP, as I connected, not registered)
so say I choose "register" instead
I'm still asked for username/password
ok I guess if I used LDAP I'd have registration disabled
does your branch/PR handle registration disabled ?
Willem van Dreumel
@willemvd
Feb 02 2017 22:05
thanks for answering your own questions :)
yes
then you can only sign in
matrixbot
@matrixbot
Feb 02 2017 22:11
strk And only connect the oAuth2, right ?
Willem van Dreumel
@willemvd
Feb 02 2017 22:17
yes
the sign up part will be disabled like when you click the normal register link at the top
I have reused the sign in and sign up templates
with some extra checks to prevent duplicate error messages etc