SyncExternalUsers doesn't finish, record the run date/time, or count as execution when there's user conflicts #3464

Closed
opened 2025-11-02 05:13:36 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @josh-hemphill on GitHub (Jun 13, 2019).

  • Gitea version (or commit ref): 1.9.0+dev-311-gfb4438a81
  • Git version: 2.20.1
  • Operating system: Ubuntu Server Disco Dingo
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
2019/06/13 16:31:24 ...xorm/xorm/session.go:835:saveLastSQL() [I] [SQL] BEGIN TRANSACTION
2019/06/13 16:31:24 .../xorm/session_get.go:95: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, "pperson"}
2019/06/13 16:31:24 ...xorm/xorm/session.go:835:saveLastSQL() [I] [SQL] ROLL BACK
2019/06/13 16:31:24 models/user.go:1667:SyncExternalUsers() [E] SyncExternalUsers[LDAP]: Error creating user PPerson: user already exists [name: pperson]

Description

SyncExternalUsers doesn't finish, record the run date/time, or count as execution when there's user conflicts.

It still seems to get all the other users just fine.
It's pretty minor, just thought I'd bring it up.

Is there a way to merge local users with AD users? Or would the easiest solution for me be to delete the local users? (It's a pretty fresh install, but one of the conflicting users has a lot of commits)

Originally created by @josh-hemphill on GitHub (Jun 13, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.9.0+dev-311-gfb4438a81 - Git version: 2.20.1 - Operating system: Ubuntu Server Disco Dingo - Database: - [ ] PostgreSQL - [X] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: ``` 2019/06/13 16:31:24 ...xorm/xorm/session.go:835:saveLastSQL() [I] [SQL] BEGIN TRANSACTION 2019/06/13 16:31:24 .../xorm/session_get.go:95: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, "pperson"} 2019/06/13 16:31:24 ...xorm/xorm/session.go:835:saveLastSQL() [I] [SQL] ROLL BACK 2019/06/13 16:31:24 models/user.go:1667:SyncExternalUsers() [E] SyncExternalUsers[LDAP]: Error creating user PPerson: user already exists [name: pperson] ``` ## Description SyncExternalUsers doesn't finish, record the run date/time, or count as execution when there's user conflicts. It still seems to get all the other users just fine. It's pretty minor, just thought I'd bring it up. Is there a way to merge local users with AD users? Or would the easiest solution for me be to delete the local users? (It's a pretty fresh install, but one of the conflicting users has a lot of commits)
GiteaMirror added the issue/staletype/bug labels 2025-11-02 05:13:36 -06:00
Author
Owner

@stale[bot] commented on GitHub (Aug 13, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 13, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Aug 27, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Aug 27, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3464