These are chat archives for go-gitea/gitea

6th
Feb 2017
Starz0r
@Starz0r
Feb 06 2017 00:26
what's the linux command to give a user permission to read and write to a file?
I need to do that for the gitea binary, but I forgot the command
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 00:28
chmod g+rwx gitea ?
would give the group access to it
and you don't need write-access to the binary...
so chmod 0755 gitea should suffice
damomurf
@damomurf
Feb 06 2017 00:29
Is there something special that needs to be done for Gitea to properly mirror an LFS repository. I've added a mirror to a repo I know uses LFS, but no LFS data seems to be being mirrored?
I confess to being a complete newb when is comes to LFS.
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 00:30
I'm not sure we mirror LFS-data :confused:
Lunny Xiao
@lunny
Feb 06 2017 00:31
We have a LFS support PR merged
Starz0r
@Starz0r
Feb 06 2017 00:31
@bkcsoft thanks for the command, but I think something might actually be fucked with my SystemD service
when I ran the ./Gitea web command from the git user
it actually worked, while SystemD was failing multiple times to run the binary
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 00:32
when all else fails, blaim systemd :joy:
Starz0r
@Starz0r
Feb 06 2017 00:33
SystemD has been the source of my problems when running Caddyserver from their default profile that they provide
Lunny Xiao
@lunny
Feb 06 2017 00:35
@damomurf seems a bug
Starz0r
@Starz0r
Feb 06 2017 00:35
I attached the file from Gitea, but these are still the only two options
damomurf
@damomurf
Feb 06 2017 00:35
Right. I only have one repo in the Gitea install, and the LFS data directory is empty.
Starz0r
@Starz0r
Feb 06 2017 00:35
apparently
nvm, you can't upload zips
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 00:36
@lunny we have LFS support yes, but do we mirror LFS as well?
since LFS is fetched outside of git pull :(
Starz0r
@Starz0r
Feb 06 2017 00:36
@bkcsoft what files are supported on the file upload?
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 00:36
not sure, I didn't review that PR :confused:
Lunny Xiao
@lunny
Feb 06 2017 00:37
Please help to fire an issue
We didn't mirror LFS I think
damomurf
@damomurf
Feb 06 2017 00:38
Sorry @lunny, you're referring to me? Happy to raise an issue if it will help?
Lunny Xiao
@lunny
Feb 06 2017 00:38
Yes @damomurf
damomurf
@damomurf
Feb 06 2017 00:38
Ok. Will do, thanks!
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 00:38
if something seems broken, file an issue :trollface: https://github.com/go-gitea/gitea/issues/new
damomurf
@damomurf
Feb 06 2017 00:44
Done: go-gitea/gitea#849
Lunny Xiao
@lunny
Feb 06 2017 01:05
Thanks
Andrew
@minecrafter
Feb 06 2017 06:18
After doing 2FA I feel like knocking something else out
Starz0r
@Starz0r
Feb 06 2017 06:19
We got TOTP in Gitea now?
Andrew
@minecrafter
Feb 06 2017 06:19
Yes, courtesy of yours truly :)
Starz0r
@Starz0r
Feb 06 2017 06:19
good job :thumbsup:
Andrew
@minecrafter
Feb 06 2017 06:19
I'm happy about it myself.
Got to learn some of the internals.
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 06:20
:tada:
Starz0r
@Starz0r
Feb 06 2017 06:20
you could try adding security key authentication to Gitea as well
it's something that Github has that Gitea and Gogs doesn't
Andrew
@minecrafter
Feb 06 2017 06:20
Like U2F or YubiKey?
Starz0r
@Starz0r
Feb 06 2017 06:20
both
I have a YubiKey personally
that I use to log into Github
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 06:20
u2f should be fairly simple :)
Andrew
@minecrafter
Feb 06 2017 06:21
I don't have any of those, but I could very well refactor my existing TOTP work to accommodate other methods
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 06:21
AFAIK it "should just work as is", only needs a JS-library for it
Andrew
@minecrafter
Feb 06 2017 06:22
Well, I can't work on that support myself as I only use TOTP myself.
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 06:23
likewise. don't have a hw-key to work with
Starz0r
@Starz0r
Feb 06 2017 06:23
if I knew gitea's internals i'd take a look at it myself
I have a very solid programming grasp
but only recently started really learning GoLang
Andrew
@minecrafter
Feb 06 2017 06:24
I'm also (fairly) new to Go myself, but I've caught up
Lunny Xiao
@lunny
Feb 06 2017 06:25
Golang is easy and simple, you can easy to contribute to Gitea
Andrew
@minecrafter
Feb 06 2017 06:42
Even then, my 2FA change was pretty small
My next change is going to be changing the English locale messages to fix awkward grammar.
For instance, "Wiki is the place where you would like to document your project together and make it better." sounds awkward
On the other hand, "A wiki allows you or your users to easily document your project." sounds much better.
Installing Gogland now (what a strange name, JetBrains)
Starz0r
@Starz0r
Feb 06 2017 06:48
How long have you been using GoLang?
@minecrafter
Andrew
@minecrafter
Feb 06 2017 06:48
Approximately a year
Only recently have I started using it for serious projects.
The one project I really want to continue working on is https://github.com/minecrafter/package-savant
Starz0r
@Starz0r
Feb 06 2017 06:50
Yeah, you have way more experience in it than I do
I've really been looking for someone who can teach me it though
Andrew
@minecrafter
Feb 06 2017 06:56
I'm a bad teacher
Starz0r
@Starz0r
Feb 06 2017 06:56
Don't really need to teach me
Andrew
@minecrafter
Feb 06 2017 06:56
But there are a lot of excellent resources out there to help you learn
Starz0r
@Starz0r
Feb 06 2017 06:56
just be there if Google isn't there for me lol
Andrew
@minecrafter
Feb 06 2017 06:56
My favorite is https://gobyexample.com
Starz0r
@Starz0r
Feb 06 2017 06:56
yeah, I've seen a few of these
but somethings haven't ever been explained to me for some reason
like this
what does the star by traffic.Request mean or do?
The star means it's a pointer.
Starz0r
@Starz0r
Feb 06 2017 07:01
yeah, I never knew that
I also don't know when I need to make additional .go files outside of the main package
I imagine if I do, I can access the them by calling the package name then the function
Oliver Marks
@olymk2
Feb 06 2017 07:12
Hi, I have been trying to upgrade from gogs it all seems to go smoothly except the database, is there some kind of miigration script ? there was nothing mentioned in the docs.
but seems the structures have changed since gogs so i just see sql errors in my logs, I am assuming they are whats preventing my login
Starz0r
@Starz0r
Feb 06 2017 07:16
what sql driver did you use before?
Oliver Marks
@olymk2
Feb 06 2017 07:17
sqlite
Starz0r
@Starz0r
Feb 06 2017 07:22
It might be what Gogs version you were using
Gitea only has full support migration from Gogs 0.9.115 and up
Oliver Marks
@olymk2
Feb 06 2017 07:34
I am on Gogs Version: 0.9.99.0903
Starz0r
@Starz0r
Feb 06 2017 07:35
yeah
that's a problem
it's not offically supported
Oliver Marks
@olymk2
Feb 06 2017 07:36
so 99 is older than 115 ? if so i guess i can upgrade gogs first else what are my options
I can register but it does not pick up my existing repositories unless there is a way todo that ?
Starz0r
@Starz0r
Feb 06 2017 07:36
dumping the gogs data
if you can upgrade while still keeping your repository
it would be the most painless method to fix this problem
Oliver Marks
@olymk2
Feb 06 2017 07:39
I will give it a try and see where i get else i guess I will have to write a script to migrate it :/
Thomas Boerger
@tboerger
Feb 06 2017 08:02
@olymk2 have you followed the guide?
older versions than 0.9.115 should work. the database gets migrated automatically.
Oliver Marks
@olymk2
Feb 06 2017 08:52
yes i did follow the guide, updated gogs to v0.9.113 there does not seem to be a version for 115 :/
itea/routers/init.go:54 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: Query repositories: no such column: external_tracker_url
thats what i see from the logs, and although everything looks good I cant login which i assume is because the migrations are failing :/
Thomas Boerger
@tboerger
Feb 06 2017 09:23
@lunny @bkcsoft do you know anything about this issue?
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 09:24
nope, haven't ran in to that...
Oliver Marks
@olymk2
Feb 06 2017 09:25
is there a way to populate the db from the existing gogs repositories, i don't mind creating the users but would rather not checkout and in all the projects
Andrey Nering
@andreynering
Feb 06 2017 10:05
Maybe it's a problem with a recent change in Gogs? gogits/gogs@be3a13a
go-gitea/gitea#840 need 1 LGTM
Lunny Xiao
@lunny
Feb 06 2017 14:31
I think maybe because gogs had changed version so that Gitea will ignore one migration
See what's your version table value
Andrey Nering
@andreynering
Feb 06 2017 14:34
@lunny Makes sense
How could we prevent that? :confused:
Oliver Marks
@olymk2
Feb 06 2017 14:34
select returns this value 1|14
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 15:09
and we expect 13 :(
Lunny Xiao
@lunny
Feb 06 2017 15:30
go-gitea/gitea#845 need one review. We addressed about 80% for v1.1
Sandro Santilli
@strk
Feb 06 2017 16:30
@lunny: done 845
Sandro Santilli
@strk
Feb 06 2017 16:42
@lunny: how about go-gitea/gitea#174 ? is that ready to test ?
strk @strk is having problems with migration too, 1|16 here
Sandro Santilli
@strk
Feb 06 2017 17:16
maybe I messed up by trying the oauth branch before
figured (repo_unit branch tried before, had to drop the table)
Andrew
@minecrafter
Feb 06 2017 18:59
https://try.gitea.io/ isn't working
it's giving me Go's standard 404 page
Oliver Marks
@olymk2
Feb 06 2017 19:21
managed to migrate in the end, had to manually copy the data luckly only about 4 tables i needed from what i could tell
Sandro Santilli
@strk
Feb 06 2017 19:23
olymk2: anything to tweak in scripts/migrate/gogs_migrate.sh ?
Oliver Marks
@olymk2
Feb 06 2017 19:28
well all my problems seemedd to be in the repository table
i basically just selected the columns from a blank gitea schema but from my gogs db then generated the inserts
gogs seems to have a lot more columns, 31 to 23 in gitea
luckly its for my own stuff so i do not need to worry about most of the data
Sandro Santilli
@strk
Feb 06 2017 19:41
what's the correct way to handle mixed translation and parameters?
ie: ctx.Tr("form.openid_been_used") + ": " + id
@lunny, @bkcsoft ^^
should we put format strings in translation files ?
uhm, it looks like yes
Sandro Santilli
@strk
Feb 06 2017 20:34
how do I make an uneditable form ?
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 20:41
@ tr, yes. Uneditable form, set all inputs to disabled
Andrew
@minecrafter
Feb 06 2017 20:41
I'll just work on adding some unit tests to my 2FA stuff
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 20:42
:heart:
Sandro Santilli
@strk
Feb 06 2017 20:54
minecrafter++
bkcsoft: I was tempted to refactor SignInPost to get the "create user, mark as admin, send confirm email" into a separate function, for reuse from OpenID user registration
@bkcsoft: but I was discouraged because they have 2 different forms, so for error handling I didn't know how to do that
just mentioning in case you feel compelled to refactor it yourself for the rest of us to be happpier :P
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 20:59
I might. But not until earliest March :(
Sandro Santilli
@strk
Feb 06 2017 20:59
uhm, and now I need a way to handle the "delete account"
I dont' want to force users to have a password
but right now it takes entering a password to delete your account
for the moment I created a random password when registering a new user with OpenID
also for changing password you need to know the current password
now this is getting annoying :/
the whole point of OpenID is to be able to NOT enter a password in the "consumer" websites...
uhm, [Macaron] PANIC: unrecognized login source type: 6
Sandro Santilli
@strk
Feb 06 2017 21:05
it happens when a malformed login_source is present (could be made more robust)
Kim "BKC" Carlbäcker
@bkcsoft
Feb 06 2017 21:06
IMO do the openid-reg cycle for it. Having them with via backing service to delete :)
Sandro Santilli
@strk
Feb 06 2017 21:08
what do you mean by "openid-reg cycle" ?
for deleting an account and updating a password ?
Sandro Santilli
@strk
Feb 06 2017 21:17
btw, go-gitea/gitea#855 is a typo PR, pretty easy, please LGTM :)
Sandro Santilli
@strk
Feb 06 2017 21:40
I see the famous race conditions, btw
like in addEmailAddress (which I've copied to do addOpenID...)
the code first checks for the given email to be used already
and then isnerts
between the check and the insert it could still happen that something else adds the thing in the table
it would be also more performant to not check upfront but handle the response from DB (ie: not-unique exception) -- I guess XORM can handle that, @lunny ?
Andrew
@minecrafter
Feb 06 2017 22:04
@strk make sure it works with TOTP as well
I actually refactored out part of the sign in logic for TOTP myself
Sandro Santilli
@strk
Feb 06 2017 22:09
TOTP ?
@minecrafter: handleSignIn I've already being using :)
but I don't understand what TOTP means (anyway, going to bed now)
okay
:)
it's the two factor authentication I implemented
Sandro Santilli
@strk
Feb 06 2017 22:13
so using handleSignin already takes care of that ?
Andrew
@minecrafter
Feb 06 2017 22:14
No
just saw what you were doing