Gitea: Transfer the ownership θ½¬η§»δ»“εΊ“ζ‰€ζœ‰ζƒ do not work in V1.90~V1.92

Created on 23 Aug 2019  Β·  69Comments  Β·  Source: go-gitea/gitea

i loopback to v1.83,it works.

kinbug

Most helpful comment

OK, filesystem.Storage has ObjectStorage as a field which does have a Close method.

We set this as a private field in git.Repository here:

https://github.com/go-gitea/gitea/blob/a647a54a08fc78286ea6ded008ea368f43e7c2ca/modules/git/repo.go#L111

So we could add a Close() method to git.Repository

All 69 comments

(Please forgive if I read θ½¬η§»δ»“εΊ“ζ‰€ζœ‰ζƒ incorrectly. I am using Gitea with English language settings)
Do you get a specific error why trying to use "Transfer Ownership" from the repository settings?

I just tested in https://try.gitea.io/demoorg1/iss7947 (which is actually v1.10.0 dev build), and was able to transfer this repo from myself, to be owned by a different organization.
In my personal Gitea instance running v1.9.2 I was also able to Transfer Ownership of a repository to a different username.

In the gitea.log, I think it looks something like this:

gitea.log:2019/08/31 23:40:03 ...rm/session_update.go:375:Update() [I] [SQL] UPDATE "repository" SET "owner_id" = $1, "lower_name" = $2, "name" = $3, "description" = $4, "default_branch" = $5, "num_watches" = $6, "size" = $7, "updated_unix" = $8 WHERE "id"=$9 []interface {}{6, "demorepo", "demorepo", "demo for SSH activity", "master", 1, 20480, 1567309203, 5}
gitea.log:2019/08/31 23:40:03 .../xorm/session_raw.go:143:queryBytes() [I] [SQL] INSERT INTO "action" ("user_id","op_type","act_user_id","repo_id","comment_id","is_deleted","ref_name","is_private","content","created_unix") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" []interface {}{2, 8, 2, 5, 0, false, "", true, "demoorg/demorepo", 1567309203}
gitea.log:2019/08/31 23:40:03 ...rm/session_delete.go:211:Delete() [I] [SQL] DELETE FROM "repo_redirect" WHERE "owner_id"=$1 AND "lower_name"=$2 []interface {}{6, "demorepo"}
gitea.log:2019/08/31 23:40:03 ...rm/session_delete.go:211:Delete() [I] [SQL] DELETE FROM "repo_redirect" WHERE "owner_id"=$1 AND "lower_name"=$2 []interface {}{5, "demorepo"}
gitea.log:2019/08/31 23:40:03 .../xorm/session_raw.go:143:queryBytes() [I] [SQL] INSERT INTO "repo_redirect" ("owner_id","lower_name","redirect_repo_id") VALUES ($1, $2, $3) RETURNING "id" []interface {}{5, "demorepo", 5}

I didn't encounter a problem when testing it. Hopefully your log may show some interesting messages

log on console:

[Macaron] 2019-09-06 13:44:37: Completed POST /go/XM_51SLQ/settings 500 Internal
 Server Error in 27.3438ms
[Macaron] 2019-09-06 13:44:37: Started GET /img/500.png for 163.179.111.209
[Macaron] [Static] Serving /img/500.png
[Macaron] 2019-09-06 13:44:37: Completed GET /img/500.png 200 OK in 0s

logfile:

2019/09/06 13:44:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/06 13:44:20 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/06 13:44:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "xm_51slq"}
2019/09/06 13:44:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{34, 1}
2019/09/06 13:44:20 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{34}
2019/09/06 13:44:20 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{34, false}
2019/09/06 13:44:20 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT * FROM `user` INNER JOIN `team_user` ON `team_user`.org_id=`user`.id INNER JOIN `team` ON `team`.id=`team_user`.team_id WHERE (`team_user`.uid=?) AND (`team`.authorize=?) ORDER BY `user`.`name` ASC []interface {}{1, 4}
2019/09/06 13:44:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? AND fork_id=?) LIMIT 1 []interface {}{5, 34}
2019/09/06 13:44:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `uid`, `repo_id` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:20 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT topic.* FROM `topic` INNER JOIN repo_topic ON repo_topic.topic_id = topic.id WHERE repo_topic.repo_id=? ORDER BY `topic`.`repo_count` DESC []interface {}{34}
2019/09/06 13:44:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/06 13:44:20 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT max( id ) as id FROM `commit_status` WHERE (repo_id = ?) AND (sha = ?) GROUP BY context_hash ORDER BY max( id ) desc LIMIT 10 []interface {}{34, "b8ce9d60fa5d3e3b9cbd8ab77374e4c8f1883596"}
2019/09/06 13:44:27 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/06 13:44:27 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/06 13:44:27 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "xm_51slq"}
2019/09/06 13:44:27 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{34, 1}
2019/09/06 13:44:27 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{34}
2019/09/06 13:44:27 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{34, false}
2019/09/06 13:44:27 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT * FROM `user` INNER JOIN `team_user` ON `team_user`.org_id=`user`.id INNER JOIN `team` ON `team`.id=`team_user`.team_id WHERE (`team_user`.uid=?) AND (`team`.authorize=?) ORDER BY `user`.`name` ASC []interface {}{1, 4}
2019/09/06 13:44:27 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? AND fork_id=?) LIMIT 1 []interface {}{5, 34}
2019/09/06 13:44:27 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:27 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `uid`, `repo_id` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/06 13:44:37 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "xm_51slq"}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{34, 1}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{34}
2019/09/06 13:44:37 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{34, false}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT * FROM `user` INNER JOIN `team_user` ON `team_user`.org_id=`user`.id INNER JOIN `team` ON `team`.id=`team_user`.team_id WHERE (`team_user`.uid=?) AND (`team`.authorize=?) ORDER BY `user`.`name` ASC []interface {}{1, 4}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? AND fork_id=?) LIMIT 1 []interface {}{5, 34}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `uid`, `repo_id` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE (id!=?) AND `lower_name`=? LIMIT 1 []interface {}{0, "ximo"}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"ximo"}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{2, "xm_51slq"}
2019/09/06 13:44:37 ...xorm/xorm/session.go:845:saveLastSQL() [I] [SQL] BEGIN TRANSACTION
2019/09/06 13:44:37 ...rm/session_update.go:375:Update() [I] [SQL] UPDATE `repository` SET `owner_id` = ?, `lower_name` = ?, `name` = ?, `description` = ?, `default_branch` = ?, `num_watches` = ?, `size` = ?, `updated_unix` = ? WHERE `id`=? []interface {}{2, "xm_51slq", "XM_51SLQ", "鏂板攼51ι—ζ› ε’–ιˆθ™Ήε„³ιζ¬ζ«’LEDι˜θˆ΅β‚¬δ½½ζ΅†ιŽΉγˆ ζ«’", "master", 1, 1158144, 1567748677, 34}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? []interface {}{34}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `org_id`, `lower_name`, `name`, `description`, `authorize`, `num_repos`, `num_members` FROM `team` WHERE `org_id`=? AND `lower_name`=? LIMIT 1 []interface {}{2, "owners"}
2019/09/06 13:44:37 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `team_repo` (`org_id`,`team_id`,`repo_id`) VALUES (?, ?, ?) []interface {}{2, 1, 34}
2019/09/06 13:44:37 ...rm/session_update.go:375:Update() [I] [SQL] UPDATE `team` SET `num_repos` = `num_repos` + ? WHERE `id`=? []interface {}{1, 1}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? []interface {}{34}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `org_id`, `lower_name`, `name`, `description`, `authorize`, `num_repos`, `num_members` FROM `team` WHERE (org_id=?) ORDER BY CASE WHEN name LIKE 'Owners' THEN '' ELSE name END []interface {}{2}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `org_id`, `team_id`, `uid` FROM `team_user` WHERE (team_id=?) []interface {}{1}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{3}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{6}
2019/09/06 13:44:37 ...rm/session_delete.go:211:Delete() [I] [SQL] DELETE FROM `access` WHERE `repo_id`=? []interface {}{34}
2019/09/06 13:44:37 ...rm/session_insert.go:264:innerInsertMulti() [I] [SQL] INSERT INTO `access` (`user_id`, `repo_id`, `mode`) VALUES (?, ?, ?),(?, ?, ?),(?, ?, ?) []interface {}{3, 34, 4, 6, 34, 4, 1, 34, 4}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `org_id`, `team_id`, `uid` FROM `team_user` WHERE (team_id=?) []interface {}{1}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{3}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{6}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{6, 34}
2019/09/06 13:44:37 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `watch` (`user_id`,`repo_id`) VALUES (?, ?) []interface {}{6, 34}
2019/09/06 13:44:37 .../xorm/session_raw.go:226:Exec() [I] [SQL] UPDATE `repository` SET num_watches = num_watches + 1 WHERE id = ? []interface {}{34}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{3, 34}
2019/09/06 13:44:37 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `watch` (`user_id`,`repo_id`) VALUES (?, ?) []interface {}{3, 34}
2019/09/06 13:44:37 .../xorm/session_raw.go:226:Exec() [I] [SQL] UPDATE `repository` SET num_watches = num_watches + 1 WHERE id = ? []interface {}{34}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:37 .../xorm/session_raw.go:226:Exec() [I] [SQL] UPDATE `user` SET num_repos=num_repos+1 WHERE id=? []interface {}{2}
2019/09/06 13:44:37 .../xorm/session_raw.go:226:Exec() [I] [SQL] UPDATE `user` SET num_repos=num_repos-1 WHERE id=? []interface {}{1}
2019/09/06 13:44:37 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 34}
2019/09/06 13:44:37 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT * FROM `watch` INNER JOIN `user` ON `user`.id = `watch`.user_id WHERE (`watch`.repo_id=?) AND (`user`.is_active=?) AND (`user`.prohibit_login=?) []interface {}{34, true, false}
2019/09/06 13:44:37 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `action` (`user_id`,`op_type`,`act_user_id`,`repo_id`,`comment_id`,`is_deleted`,`ref_name`,`is_private`,`content`,`created_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{1, 8, 1, 34, 0, false, "", true, "go/XM_51SLQ", 1567748677}
2019/09/06 13:44:37 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `action` (`user_id`,`op_type`,`act_user_id`,`repo_id`,`comment_id`,`is_deleted`,`ref_name`,`is_private`,`content`,`created_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{2, 8, 1, 34, 0, false, "", true, "go/XM_51SLQ", 1567748677}
2019/09/06 13:44:37 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `action` (`user_id`,`op_type`,`act_user_id`,`repo_id`,`comment_id`,`is_deleted`,`ref_name`,`is_private`,`content`,`created_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{3, 8, 1, 34, 0, false, "", true, "go/XM_51SLQ", 1567748677}
2019/09/06 13:44:37 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `action` (`user_id`,`op_type`,`act_user_id`,`repo_id`,`comment_id`,`is_deleted`,`ref_name`,`is_private`,`content`,`created_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{6, 8, 1, 34, 0, false, "", true, "go/XM_51SLQ", 1567748677}
2019/09/06 13:44:37 ...xorm/xorm/session.go:845:saveLastSQL() [I] [SQL] ROLL BACK
2019/09/06 13:44:37 ...ters/repo/setting.go:378:SettingsPost() [E] TransferOwnership: rename repository directory: rename C:\GitEA\data\git\go\xm_51slq.git C:\GitEA\data\git\ximo\xm_51slq.git: Access is denied.

the login ID is admin ,has the rights of all the repo,why Access is denied.
system: win2008 R2
git version 2.22.0.windows.1
gitea:1.92

Maybe you should not store you gitea data on C:\ on windows since it's a system disk

@lunny I'm experiencing frequent 500 errors after transferring repos to an organization.
This is recent as I upgraded to Gitea 1.9.2 just last week and coincides with the 500s.

I'm currently resolving this by stoping and restarting my gitea service installd on Raspbian (raspberry pi, arm7).

@lunny I'm experiencing frequent 500 errors after transferring repos to an organization.
This is recent as I upgraded to Gitea 1.9.2 just last week and coincides with the 500s.

I'm currently resolving this by stoping and restarting my gitea service installd on Raspbian (raspberry pi, arm7).

@loup-brun A "500 error" is a generic code meaning "something unexpected happened". It would be very useful if you could paste here a relevant part of your gitea.log from the moment the error happened.

Here is a log right after getting my 500 errors:

2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `index`, `poster_id`, `name`, `content`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked` FROM `issue` WHERE `repo_id`=? AND `index`=? LIMIT 1 []interface {}{40, 20}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `index`, `poster_id`, `name`, `content`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked` FROM `issue` WHERE `repo_id`=? AND `index`=? LIMIT 1 []interface {}{50, 16}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `index`, `poster_id`, `name`, `content`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked` FROM `issue` WHERE `repo_id`=? AND `index`=? LIMIT 1 []interface {}{50, 28}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `type`, `poster_id`, `issue_id`, `label_id`, `old_milestone_id`, `milestone_id`, `assignee_id`, `removed_assignee`, `old_title`, `new_title`, `dependent_issue_id`, `commit_id`, `line`, `tree_path`, `content`, `patch`, `created_unix`, `updated_unix`, `commit_sha`, `review_id`, `invalidated` FROM `comment` WHERE `id`=? LIMIT 1 []interface {}{2280}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `index`, `poster_id`, `name`, `content`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked` FROM `issue` WHERE `id`=? LIMIT 1 []interface {}{319}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 []interface {}{50}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `name` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{3}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `index`, `poster_id`, `name`, `content`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked` FROM `issue` WHERE `repo_id`=? AND `index`=? LIMIT 1 []interface {}{50, 28}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `email`=? LIMIT 1 []interface {}{"[email protected]"}
2019/09/07 14:07:32 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `index`, `poster_id`, `name`, `content`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked` FROM `issue` WHERE `repo_id`=? AND `index`=? LIMIT 1 []interface {}{50, 6}
2019/09/07 14:07:32 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `org_user` WHERE (uid=?) []interface {}{1}
2019/09/07 14:07:34 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:34 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"louis"}
2019/09/07 14:07:34 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(created_unix))) AS timestamp, count(user_id) as contributions FROM `action` WHERE (user_id = ?) AND (created_unix > ?) AND (act_user_id = ?) GROUP BY timestamp ORDER BY timestamp []interface {}{1, 1536343654, 1}
2019/09/07 14:07:34 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:34 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `repository` WHERE (owner_id=? OR (((repository.id IN (SELECT repo_id FROM `access` WHERE access.user_id = ?)) OR id IN (SELECT `team_repo`.repo_id FROM team_repo INNER JOIN team_user ON `team_user`.team_id = `team_repo`.team_id WHERE `team_user`.uid=?)) AND owner_id<>?)) []interface {}{1, 1, 1, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? OR (((repository.id IN (SELECT repo_id FROM `access` WHERE access.user_id = ?)) OR id IN (SELECT `team_repo`.repo_id FROM team_repo INNER JOIN team_user ON `team_user`.team_id = `team_repo`.team_id WHERE `team_user`.uid=?)) AND owner_id<>?)) ORDER BY updated_unix DESC LIMIT 15 []interface {}{1, 1, 1, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE (id > 0) AND `id` IN (?,?) []interface {}{3, 1}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{40, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{40}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{41, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{41}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{50, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{50}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{43, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{43}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{46, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{46}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{25, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{25}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{9, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{9}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{20, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{20}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{26, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{26}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{45, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{45}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{35, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{35}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{30, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{30}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{34, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{34}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{33, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{33}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{31, 1}
2019/09/07 14:07:35 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{31}
2019/09/07 14:07:35 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:35 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/07 14:07:41 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"louis"}
2019/09/07 14:07:41 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "phi3250-h19-travail-2"}
2019/09/07 14:07:41 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `redirect_repo_id` FROM `repo_redirect` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "phi3250-h19-travail-2"}
2019/09/07 14:07:41 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 []interface {}{26}
2019/09/07 14:07:41 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `name` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{3}
2019/09/07 14:07:42 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"umontreal"}
2019/09/07 14:07:42 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{3, "phi3250-h19-travail-2"}
2019/09/07 14:07:42 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{26}
2019/09/07 14:07:42 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{26, false}
2019/09/07 14:07:42 ...ules/context/repo.go:664:func1() [E] GetCommitsCount: fork/exec /usr/bin/git: cannot allocate memory
2019/09/07 14:07:54 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:54 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/07 14:07:54 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"umontreal"}
2019/09/07 14:07:54 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{3, "fra3310-a19-notes"}
2019/09/07 14:07:54 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{40, 1}
2019/09/07 14:07:54 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{40}
2019/09/07 14:07:54 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{40, false}
2019/09/07 14:07:54 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? AND fork_id=?) LIMIT 1 []interface {}{1, 40}
2019/09/07 14:07:54 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 40}
2019/09/07 14:07:54 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `uid`, `repo_id` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 40}
2019/09/07 14:07:54 ...ules/context/repo.go:664:func1() [E] GetCommitsCount: fork/exec /usr/bin/git: cannot allocate memory
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:55 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "gitea-stuff"}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{41, 1}
2019/09/07 14:07:55 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{41}
2019/09/07 14:07:55 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{41, false}
2019/09/07 14:07:55 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT * FROM `user` INNER JOIN `team_user` ON `team_user`.org_id=`user`.id INNER JOIN `team` ON `team`.id=`team_user`.team_id WHERE (`team_user`.uid=?) AND (`team`.authorize=?) ORDER BY `user`.`name` ASC []interface {}{1, 4}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? AND fork_id=?) LIMIT 1 []interface {}{2, 41}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 41}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `uid`, `repo_id` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 41}
2019/09/07 14:07:55 ...ules/context/repo.go:664:func1() [E] GetCommitsCount: fork/exec /usr/bin/git: cannot allocate memory
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:55 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"umontreal"}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{3, "fra3314-a19-notes"}
2019/09/07 14:07:55 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? AND `user_id`=? LIMIT 1 []interface {}{50, 1}
2019/09/07 14:07:55 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{50}
2019/09/07 14:07:56 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{50, false}
2019/09/07 14:07:56 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? AND fork_id=?) LIMIT 1 []interface {}{1, 50}
2019/09/07 14:07:56 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 50}
2019/09/07 14:07:56 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `uid`, `repo_id` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 50}
2019/09/07 14:07:56 ...ules/context/repo.go:664:func1() [E] GetCommitsCount: fork/exec /usr/bin/git: cannot allocate memory
2019/09/07 14:07:56 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:56 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/07 14:07:56 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:56 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/07 14:07:57 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/09/07 14:07:57 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2019/09/07 14:08:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"louis"}
2019/09/07 14:08:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "phi2180-notes-h19"}
2019/09/07 14:08:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `redirect_repo_id` FROM `repo_redirect` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "phi2180-notes-h19"}
2019/09/07 14:08:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 []interface {}{23}
2019/09/07 14:08:20 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `name` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{3}
2019/09/07 14:08:21 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"umontreal"}
2019/09/07 14:08:21 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{3, "phi2180-h19-notes"}
2019/09/07 14:08:21 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{23}
2019/09/07 14:08:21 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{23, false}
2019/09/07 14:08:21 ...ules/context/repo.go:664:func1() [E] GetCommitsCount: fork/exec /usr/bin/git: cannot allocate memory
2019/09/07 14:08:30 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"louis"}
2019/09/07 14:08:30 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "spotful-landing"}
2019/09/07 14:08:30 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{37}
2019/09/07 14:08:30 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{37, false}
2019/09/07 14:08:30 ...ules/context/repo.go:664:func1() [E] GetCommitsCount: fork/exec /usr/bin/git: cannot allocate memory
2019/09/07 14:08:49 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"louis"}
2019/09/07 14:08:49 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "phi3250-h19-travail-recherche"}
2019/09/07 14:08:49 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `redirect_repo_id` FROM `repo_redirect` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "phi3250-h19-travail-recherche"}
2019/09/07 14:08:49 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 []interface {}{12}
2019/09/07 14:08:49 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `name` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{3}
2019/09/07 14:08:51 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"umontreal"}
2019/09/07 14:08:51 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `owner_id`, `lower_name`, `name`, `description`, `website`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{3, "phi3250-h19-travail-recherche"}
2019/09/07 14:08:51 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{12}
2019/09/07 14:08:51 .../xorm/session_raw.go:87:queryRow() [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{12, false}
2019/09/07 14:08:51 ...ules/context/repo.go:664:func1() [E] GetCommitsCount: fork/exec /usr/bin/git: cannot allocate memory

Seems like you are running out of memory

@lafriks any suggestion on how to resolve this? That's what I thought, so I searched the Gitea documentation for options to configure memory limit on my gitea installation, but I found no option.

I am experiencing this only on repos recently transferred to an organization (old repos are fine).

@loup-brun Perhaps those repos have other issues besides having been recently transferred. Are they big? Have many files? Many commits? You could try running some git commands on them yourself directly from the shell and see what happens. For instance, there is git-fsck that does some sanity checks. Gitea can do git-fsck itself, but if you doubt Gitea it could be nice to have a "second opinion" directly from git.
Also, make sure to use the same user as Gitea for those tests. The root user, for instance, will not have the same restrictions in resource usage.

@guillep2k Small repos (max 4 MB), few files, max 10 commits. Only new projects (created since I updated to Gitea 1.9.2 from 1.8), which is why I suspect it has something to do with the update.

(old repos created before the update not affected by this bug)

@guillep2k Small repos (max 4 MB), few files, max 10 commits. Only new projects (created since I updated to Gitea 1.9.2 from 1.8), which is why I suspect it has something to do with the update.

(old repos created before the update not affected by this bug)

@loup-brun It wouldn't hurt checking them anyway. Could they have become corrupted somehow?

If you are interested, the standard procedure in my company is for the dev to create the repository, have some structural work done and then transfer it to the company org. We are using 1.9.2 without problems so far.

@loup-brun what's your git version and how did you install it?

@guillep2k I run git fsck without any problem (and have this feature turned on in Gitea).

@lunny I have git version 2.11.0 installed.
I simply update my gitea by replacing the binary /usr/local/bin/gitea (with appropriate group/file permissions) and restarting the gitea service.

I rolled back to gitea 1.8.3 (just like @gwnpeter) which works fine, no error whatsoever on those repos which I transferred ownership (tested them all several times a day for 2-3 days now).

On Windows, seems that some file still locked during os.Rename

The file object\XXXXXXXXXXXXXXXXXXXXXX.pack still locked

This looks like a concurrency problem, and IMHO difficult to solve in a bulletproof way. You have more than one process accessing the repo at the time of migration, so the migration code fails.

If you think your users are not accessing it, please check whether any automated tool either is running things on it or left processes behind locking the file. In Windows I've found that Process Explorer (a Microsoft official utility) has a search handle function that tells you which processes have a particular file open. It may be of help.

Another related and very useful utility (you can check that out) is Process Monitor, although it's a bit more difficult to use. You need to set up the filters to log only the pahts you're interested in.

I've tried with Process Monitor, pack file is locked by gitea.exe. I've put a 30sec pause before the rename, close the locked file with Process Monitor and after the pause, the repository is transfered right

I think that some git operation was transferred from git to a go library (go-git?) in 1.9.0. Perhaps that library does some caching or needs some garbage collection in order to free the files?
@nikybiasion Please try the following: remove the delay from the code, but wait in the UI 30 seconds before pressing the last confirmation button. If the problem goes away, it means that the lock is produced in some operation from the page rendered before.

Another interesting test is placing the 30s delay in different parts of the code, from the earliest point to the latest (you know that one works), until we find the point that is introducing the lock. BTW good catch!

if i go to transfer page, wait until the lock disapper, click transfer, i get 500 error and the pack file became locked.

if i go to transfer page, wait until the lock disapper, click transfer, i get 500 error and the pack file became locked.

Good to know; if you can confirm that no other accesses were being made to that repo, that should tell us that Gitea is locking itself withing the transfer procedure. That certainly shortens the search.

Hello,

Same issue for me.
Windows 7 Pro SP1
SQLite version 3.30.1 2019-10-10 20:19:45
gitea-1.9.4-windows-4.0-amd64

Log Extract

s`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `is_fork`, `fork_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "myrepo"}
2019/10/17 10:20:06 ...xorm/xorm/session.go:845:saveLastSQL() [I] [SQL] BEGIN TRANSACTION
2019/10/17 10:20:06 ...rm/session_update.go:375:Update() [I] [SQL] UPDATE `repository` SET `owner_id` = ?, `lower_name` = ?, `name` = ?, `default_branch` = ?, `num_watches` = ?, `size` = ?, `updated_unix` = ? WHERE `id`=? []interface {}{1, "myrepo", "myrepo", "master", 1, 126311424, 1571300406, 2}
2019/10/17 10:20:06 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? []interface {}{2}
2019/10/17 10:20:06 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `repo_id`, `user_id`, `mode` FROM `collaboration` WHERE `repo_id`=? []interface {}{2}
2019/10/17 10:20:06 ...rm/session_delete.go:211:Delete() [I] [SQL] DELETE FROM `access` WHERE `repo_id`=? []interface {}{2}
2019/10/17 10:20:06 .../xorm/session_raw.go:226:Exec() [I] [SQL] UPDATE `user` SET num_repos=num_repos+1 WHERE id=? []interface {}{1}
2019/10/17 10:20:06 .../xorm/session_raw.go:226:Exec() [I] [SQL] UPDATE `user` SET num_repos=num_repos-1 WHERE id=? []interface {}{2}
2019/10/17 10:20:06 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{2, 2}
2019/10/17 10:20:06 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT * FROM `watch` INNER JOIN `user` ON `user`.id = `watch`.user_id WHERE (`watch`.repo_id=?) AND (`user`.is_active=?) AND (`user`.prohibit_login=?) []interface {}{2, true, false}
2019/10/17 10:20:06 ...rm/session_insert.go:513:innerInsert() [I] [SQL] INSERT INTO `action` (`user_id`,`op_type`,`act_user_id`,`repo_id`,`comment_id`,`is_deleted`,`ref_name`,`is_private`,`content`,`created_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{2, 8, 2, 2, 0, false, "", false, "philibe/myrepo", 1571300406}
2019/10/17 10:20:06 ...xorm/xorm/session.go:845:saveLastSQL() [I] [SQL] ROLL BACK
2019/10/17 10:20:06 ...ters/repo/setting.go:378:SettingsPost() [E] TransferOwnership: rename repository directory: rename C:\gitea\gitea-repositories\philibe\myrepo.git C:\gitea\gitea-repositories\admin1\myrepo.git: Accès refusé.

I workaround by

  • delete repo for philibe in gitea,
  • recreate empty repo in gitea for admin1,
  • and git push to admin1 (from command line linux).

edit:
restart service and delete session don't unlock.

edit2:
In fact I would like transfer 3 repos. For the 1st it worked, but it didn't not for the 2nd and 3rd (except by the workaround delete/recreate).

Have you installed antivirus software and enabled it? If that, could you try disable it and try again?

@lunny I'm experiencing the same issue (see #8565), I'm not running any AV software.

@realslacker Perhaps _Tortoise_ or another local git helper that it's integrated with Windows shell?

You can use process monitor from Microsoft's sysinternals to try and find what process is holding up the files:

image

I'd use a filter like this:

image

This should tell us which other program might be locking the directory, or is it Gitea itself.

The only service on the server is Gitea. This server is a brand new VM spun up for Gitea and I experienced this issue when moving a repo that was freshly imported into the wrong account.

The only service on the server is Gitea. This server is a brand new VM spun up for Gitea and I experienced this issue when moving a repo that was freshly imported into the wrong account.

@realslacker I was hoping to check whether the locker was Gitea's service process or a child from it (e.g. some lingering git that should not be there).

I think it's problem with windows permission granting to gitea executable. i tried running as service and also manually as administrator but got the same access denied.

I think it's problem with windows permission granting to gitea executable. i tried running as service and also manually as administrator but got the same access denied.

The error message is misleading (although it comes from Windows itself). It's almost certainly a file locking problem. We only couldn't find out in what step the directory becomes locked/fails to be released yet. Most UNIX-like filesystems don't care about file/dir locking for renaming/moving, but Windows does.

Is there a way to do it manually or a workaround? (Like forking, then deleting the original?)

Is there a way to do it manually or a workaround? (Like forking, then deleting the original?)

I followed the tip from gwnpeter at the top, downgrading to v1.8.3. I then did all the transfering I needed to do, and upgraded back to v1.9.4.

I've tried with Process Monitor, pack file is locked by gitea.exe. I've put a 30sec pause before the rename, close the locked file with Process Monitor and after the pause, the repository is transfered right

First of all I must say that I couldn't reproduce the problem (Windows 10, 1.11.0+dev-141-g484edb758). However, I'm just noticing this important part of @nikybiasion 's comment: "pack file".

Now I'm thinking:

  • There's some lock on the repository directory _or below_ that is triggering the problem. I think this is settled.
  • "Pack file" suggests it's not the directory itself that is locked, but one of the git pack files (although @nikybiasion is clear about this, we don't know if this is true for all cases).
  • models.TransferOwnership() performs no git operation whatsoever!

So, I think the cause is completely unrelated to the transfer itself. It only happens to affect repo ownership transfer because that operation requires moving the repository folder. Possible causes:

  • Multiple users accessing the repo at the time; the repo home page, code reviewing, cloning, etc.
  • Some git hook in operation (unrelated to the transfer).
  • _(My bet)_ Some garbage collection is holding up an opened file.

For example, I follow this path:

func git.OpenRepository() ...
{
    storage := filesystem.NewStorageWithOptions(fs,  ...
    gogitRepo, err := gogit.Open(storage, fs) ....
    return &Repository{
        Path:         repoPath,
        gogitRepo:    gogitRepo,
        gogitStorage: storage,
        tagCache:     newObjectCache(),
    }, nil
}

func models.GetActivityStats() ....
{
    ....
    gitRepo, err := git.OpenRepository(repo.RepoPath())
    // (gitRepo not explicitly destroyed/disposed)
    ....
}

GetActivityStats() is just the first function I've found calling OpenRepository(); there may be many more. Is it possible that operations like this will keep the repo files open due to lazy garbage collection? Linux users won't notice, but Windows users _will_. And it will not be easy to reproduce in a simple test installation with only a couple of repositories and a single user.

Hmm might it make sense to run a git gc just before moving the git repository? I'm not sure what gc does when a pack file is locked but I think it waits. If so after the GC is done all locks should have been released and you should be able to move the repo.

The only other option I can think of is to fully clone the repo on Windows and do a deferred delete perhaps using the git gc trick above to ensure that when it finishes you're hopefully ready to delete.

Because of our file system architecture with a move its possible on all systems that a transfer of a busy repo could lead to failures of pushes, be those from web edits, merges or external. On Linux that could lead to dangling objects, on windows they should just disappear in to the ether.

The only true way to prevent this from ever happening is that repos are stored by their immutable ID. Cloning would prevent that inconsistent data but would not allow ongoing actions to succeed.

As an aside if we did move to the id approach described above to help users recover from inevitable crashes the .git/config file should be updated to contain the real name and owner of the repository.

I think we could generally further (ab)use our git repositories to store more of our basic information to help people restore from failures.

Even more crazy: The git object db and references are just a hash object store - there's nothing that says you have to store only source files in there, issues and comments could all be there. There's a surprising number of people who manage to hose their DBs.

My input based on my situation:

  • Fresh gitea installation (<36 hours old)
  • Beside myself, no other users currently using the system
  • Code indexing enabled
  • Repository in question was imported >24 hours ago

So, I think the cause is completely unrelated to the transfer itself. It only happens to affect repo ownership transfer because that operation requires moving the repository folder. Possible causes:

* Multiple users accessing the repo at the time; the repo home page, code reviewing, cloning, etc.

I think that is ruled out, because I was the only one using the system (we are in de pre-steps of migrating from SVN to git). Of course, I was on the settings page of the repository in question πŸ˜ƒ

* Some git hook in operation (unrelated to the transfer).

No commits beside the initial import (git --mirror push <path to git svn cloned repo>). No hooks have also been made.

* **_(My bet)_** Some garbage collection is holding up an opened file.

That or the code indexing operation I think. But it is always happens. I haven't checked whether I can do it via the API, perhaps it would work then.

I'm also the only user of my Gitea installation. The repositories in question were moved from SVN the same day. I decided right away I had to partition the repos into 2 organizations. About half the repos transfered ownership without problems. I could not identify any similarities between the ones that didn't, but it was consistently the same repos that had the problem. I could transfer the other ones back and forth multiple times without issue. Restarting the Gitea service didn't help. I used process explorer on a couple of the attempted transfers, and all of them created a lock on a .pack file the exact moment I pressed the "transfer ownership" button.

In the light of the new information, I've found out that my claim that "_the transfer repo doesn't access the repo files_" was .... incomplete. It turns out that as part of Macaron routing, two functions are executed right before routers/repo/setting.go:SettingsPost() (i.e. before processing the transfer request):

  • RepoAssignment() performs a lot of queries, all of them to repository refs.
  • RepoRefByType() calls GetBranchCommit() and GetCommitsCount(); they both open the repository objects to do their work.

If someone is interested, these are the system calls captured by _Process Monitor_ (I still can't reproduce the bug locally):

RepoAssignment.txt
RepoRefByType.txt

That or the code indexing operation I think. But it is always happens. I haven't checked whether I can do it via the API, perhaps it would work then.

I thought about that, but indexing is only performed after actual changes (i.e. commits, import repos). For what you guys said, I think indexing shuold be long complete at the time of your tests. Transferring the ownership doesn't change the repo ID in the database, so the index doesn't need to be updated (and it doesn't).

In my case I verified with pshandle and Process Monitor no open handles were at the directory or any file below it. Still, I thought it might be relevant πŸ‘

In my case I verified with pshandle and Process Monitor no open handles were at the directory or any file below it. Still, I thought it might be relevant πŸ‘

@Sebazzz And it _still failed_?

Yes, transferring the repository failed. As you mentioned, some actions involving reading the repository happen when clicking the button. Then it failed when moving.

@zeripath Rather than doing very complicate maneuvers to perform a task that works 99% of the time very efficiently, what about this plan?:

  • Attempt to rename the directory. Success? Done
  • Call runtime.GC() and back off a couple of seconds.
  • Retry (maybe a couple of times).

@nikybiasion was successful by "brutally" inserting a 30s pause before the rename.

Maybe only for Windows?

I could live with that, it is not like I make a habit of moving repositories around. If it takes 30 seconds longer it is at least a temporary fix.

I could live with that, it is not like I make a habit of moving repositories around. If it takes 30 seconds longer it is at least a temporary fix.

I don't mean implement a 30 second delay! πŸ˜† Just one and try again. It's only that this _has been tested_ with 30s.

I'm hitting this when renaming a repo in an org:

2019/11/07 15:18:24 ...ters/repo/setting.go:82:SettingsPost() [E] ChangeRepositoryName: rename repository directory: rename D:\Gitea\data\repositories\xxx\aaaaaaa.git D:\Gitea\data\repositories\xxx\yyyy.git: Access is denied.

This might be related.

@Sebazzz I totally think it's related, but I was never able to reproduce. Are you able to reproduce this with a new repo? (e.g. one that has no traffic or a complex history).

@guillep2k Yes, I can reproduce the ownership transfer issue and rename issue on a new repository with only 1 commit.

Can I workaround by moving / renaming the directory manually and renaming references in the database?

@guillep2k Yes, I can reproduce the ownership transfer issue and rename issue on a new repository with only 1 commit.

Can I workaround by moving / renaming the directory manually and renaming references in the database?

@Sebazzz Yes, just for a rename you can; for a transfer it's more complicated because of the team permissions; I'm not sure about the correct procedure. If you're pressed to transfer the repo and you don't care about issues/PRs, you could just import/migrate it into the org and delete it from the user's. You need to enable local file migration in app.ini for that.

However, I'm more interested in finding the root cause. 😁
Can you collect the following information for me about the repo and its folder?

  • In what kind of file-system is the repo based? NTFS? Network?
  • Can you check the user permissions in the folder (I don't expect surprises here, since it's a lock problem but...)
  • Can you check the exact path for the Gitea executable is the same as it shows in the .ssh/authorize_keys for its user? (or you can just rewrite the authorized_keys from the admin panel an try the rename/transfer again). Is is possible that you have more than one gitea.exe somewhere in your system?
  • Does the repo have any non-default git hooks on the server side?

Thank you!

Maybe indexer or other task are running.

@lunny No, I can rename from Windows Explorer or PowerShell just fine.

Can you collect the following information for me about the repo and its folder?

* In what kind of file-system is the repo based? NTFS? Network?

Standard NTFS:

C:\Windows\system32>fsutil fsinfo ntfsinfo D:
NTFS Volume Serial Number :        0x1ed49713d496ec71
NTFS Version   :                   3.1
LFS Version    :                   2.0
Number Sectors :                   0x000000001ffbefff
Total Clusters :                   0x0000000003ff7dff
Free Clusters  :                   0x0000000002f5f140
Total Reserved :                   0x000000000000138f
Bytes Per Sector  :                512
Bytes Per Physical Sector :        4096
Bytes Per Cluster :                4096
Bytes Per FileRecord Segment    :  1024
Clusters Per FileRecord Segment :  0
Mft Valid Data Length :            0x000000006bec0000
Mft Start Lcn  :                   0x00000000000c0000
Mft2 Start Lcn :                   0x0000000000000002
Mft Zone Start :                   0x0000000002d45ea0
Mft Zone End   :                   0x0000000002d526c0
Max Device Trim Extent Count :     4096
Max Device Trim Byte Count :       0xffffffff
Max Volume Trim Extent Count :     62
Max Volume Trim Byte Count :       0x40000000
Resource Manager Identifier :     5094AFF7-A211-11E8-9661-00155D00A402
* Can you check the user permissions in the folder (I don't expect surprises here, since it's a lock problem but...)

Those are fine, I ran an extra recursion to be sure. The gitea user is owner as well.

* Can you check the exact path for the Gitea executable is the same as it shows in the .ssh/authorize_keys for its user? (or you can just rewrite the authorized_keys from the admin panel an try the rename/transfer again). Is is possible that you have more than one gitea.exe somewhere in your system?

"C:\Users[service account].sshauthorized_keys" is an empty file (I assume you are looking for that file). I actually have SSH disabled.

I ran a dir /b/s gitea.exe in both partitions, there is only one gitea.exe

* Does the repo have any non-default git hooks on the server side?

No, just the default gitea installed hooks.

Thank you!

Thank you 😊

This is the failing operation:

High Resolution Date & Time:    8-11-2019 20:14:24,6529769
Event Class:    File System
Operation:  IRP_MJ_SET_INFORMATION
Result: ACCESS DENIED
Path:   D:\Gitea\data\repositories\[myuser]\test.git
TID:    6048
Duration:   0.0000187
Type:   SetRenameInformationFile
ReplaceIfExists:    True
FileName:   D:\Gitea\data\repositories\[myuser]\test2.git

After the operation has failed I still can rename the dir from cmd/explorer, so I don't think any handles are kept open.

However, based on this issue it appears Windows does not like it when a rename occurs while a handle is still open.

Edit: I think that might be the case, just before writing the log file, a handle to the directory is closed:

20:14:24,6530386    gitea.exe   9040    IRP_MJ_CLEANUP  D:\Gitea\data\repositories\[myuser]\test.git    SUCCESS 
20:14:24,6530485    gitea.exe   9040    IRP_MJ_CLOSE    D:\Gitea\data\repositories\[myuser]\test.git    SUCCESS 

Edit 2: It does not happen in the API (PATCH /repos/{owner}/{repo}), which means it is an issue in the edit page. Since I cannot transfer ownership via the API (hello feature request? πŸ‘ ) I cannot confirm that is also the issue for the transfer ownership.

However, based on this issue it appears Windows does not like it when a rename occurs while a handle is still open.

Thank you for all this useful information. Yes, a lock on the directory due to dangling open handles is the main suspect; it's also a noticeable difference in how Windows handles the file systems compared with Linux.

I'll try my best again to reproduce this problem with this information in mind.

I'll try my best again to reproduce this problem with this information in mind.

Good luck, I have done several attempts just now and I can't put my finger on it.

I have tried:

  • Same server, same partition, same gitea version (1.9.5), indexer enabled;
  • Almost the same config, even use mssql like the prod instance does;
  • I migrated (using built-in migrate option) a repo from the prod instance;
  • It does not matter whether gitea runs as a Windows service or interactively;
  • Running as administrator or different account does not matter.

I still cannot reproduce it, while it still goes wrong on the prod instance.

I'm not familiar with golang but I will try using delve to debug it perhaps.


I debugged it, it happens somewhere in os.Rename. There the handle to the directory is opened, which subsequently causes the issue to occur.

This sounds incredibly frustrating! @guillep2k you know it could be TestPullRequests... pr.testPatch doesn't create a temporary repo just a clean index.

If transfer ownership doesn't do:

https://github.com/go-gitea/gitea/blob/c15d371939330f3b7d0e0aeaca3116a7b1c15065/models/pull.go#L609-L610

Then it wouldn't know that the repo is supposed to be locked.

(Because of the way transfer ownership is written we probably need to add all of those locks back in everywhere.)

Somehow a handle to a pack file is kept open:

D:\Gitea\data\repositories\[user]\test.git\objects\pack\pack-e832c7bb532f38e9fbb4214dee7f14b9925789f5.pack

I observed it two times: one time one handle was kept open, one time three handles were kept open. It is not os.Rename after all. If I break the handle, the process goes fine although the second time managed to crash the gitea process.

The handles are opened before SettingsPost and the handles are soon, but not immediately cleaned up after the function returns.


After this line, the handle is cleaned up:

*edit: that is not true, it was simply then that GC happened to trigger... *

> code.gitea.io/gitea/vendor/gopkg.in/macaron%2ev1.(*Context).run() go\src\code.gitea.io\gitea\vendor\gopkg.in\macaron.v1\context.go:135 (PC: 0x9cbf2c)
Warning: debugging optimized function
   130:                         handleReturn := ev.Interface().(ReturnHandler)
   131:                         handleReturn(c, vals)
   132:                 }
   133:
   134:                 if c.Written() {
=> 135:                         return
   136:                 }
   137:         }
   138: }
   139:
   140: // RemoteAddr returns more real IP address.

I got a testcase, somehow. I'm not sure why but it always reproduces. I suspect it has something to do with the git packfiles. The handle is opened in the same thread as the thread that processes the request, so it is not a parallel operation that causes it.

This is a complete testcase, in my case I ran it at Z:\Dev\Gitea but the paths shouldn't matter.

Download link: https://1drv.ms/u/s!AuWWgEGGFWmIpOEXxslyffIglnw_6w?e=C9OKTQ
Username: testuser
Password: testcase

This is the function that leaks handles:

> code.gitea.io/gitea/modules/context.RepoRefByType.func1() go\src\code.gitea.io\gitea\modules\context\repo.go:565 (hits goroutine(735):4 total:6) (PC: 0x12114b2)
Warning: debugging optimized function
   560: }
   561:
   562: // RepoRefByType handles repository reference name for a specific type
   563: // of repository reference
   564: func RepoRefByType(refType RepoRefType) macaron.Handler {
=> 565:         return func(ctx *Context) {
   566:                 // Empty repository does not have reference information.
   567:                 if ctx.Repo.Repository.IsEmpty {
   568:                         return
   569:                 }
   570:

In this function the leaking handle is created.

I'm beginning to suspect that #6478 might be the cause. It is the only large change in this codepath. RepoRefByType hasn't changed in the last two years except for a name change. In addition, 1.8.3 is the last known version to be working and 1.9.0 is the first version to include #6478 which is essentially using a different library to read the repositories if I read the pull request correctly.


Edit: @guillep2k By reading the code I believe eventually we come to go-git:getFromPackFile:

    if !s.options.KeepDescriptors && s.options.MaxOpenDescriptors == 0 {
        defer ioutil.CheckClose(p, &err)
        }

If we then zoom out back to where the repository is opened, this option is given:

    storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true})
    gogitRepo, err := gogit.Open(storage, fs)

This means the handles to the pack files are not closed explicitly, which is exactly what I observed. Then you then rely on GC to close the handle. The handle is kept open, attempt to rename or move the repository folder is done and then "computer says no".

@Sebazzz #6478 is almost certainly the cause.

@zeripath ctx.Repo.GitRepo, err = git.OpenRepository(repoPath). There is no Close for the repository.

@zeripath ctx.Repo.GitRepo, err = git.OpenRepository(repoPath) . There is no Close for the repository.

No but there is in storage.dir. That holds the descriptors/handles for the opened packfiles. It should, at least for Windows, be closed prior to rename/TransferOwnership or have KeepDescriptors set to false. I don't know whether you want to keep this leak for Linux.

See also Storage Options:

// KeepDescriptors makes the file descriptors to be reused but they will
// need to be manually closed calling Close().
KeepDescriptors bool

@lunny @zeripath I think we should destroy ctx.Repo.Repository before the rename/migration, as it will be invalid afterwards anyway. We may need to explicitly call gc after that. At least as a workaround. In the meantime, we could ask for a Close() method upstream perhaps?

@guillep2k Just like what @Sebazzz said. It has Close on Storage, ~but we haven't hold it on Repository~. And we use KeepDescriptors as true on storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true}) .

@filipnavara Do you remember why use KeepDescriptors as true here? Could we change it to false simply?

OK, filesystem.Storage has ObjectStorage as a field which does have a Close method.

We set this as a private field in git.Repository here:

https://github.com/go-gitea/gitea/blob/a647a54a08fc78286ea6ded008ea368f43e7c2ca/modules/git/repo.go#L111

So we could add a Close() method to git.Repository

Do you remember why use KeepDescriptors as true here? Could we change it to false simply?

It is performance optimization to avoid constant re-opening of the files [for the duration of one page load]. As @zeripath pointed out there's a Close method that should be called at some point. It probably got lost during one of my rebases when adjusting the code.

Is that Close method also worth calling at the end of every request instead of relying on the GC in general (beside the solution of calling it early for these two bugs)?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kifirkin picture kifirkin  Β·  3Comments

BNolet picture BNolet  Β·  3Comments

lunny picture lunny  Β·  3Comments

thehowl picture thehowl  Β·  3Comments

Fastidious picture Fastidious  Β·  3Comments