Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 when adding existing deploy key to project #3960

Closed
2 of 7 tasks
FloMiau opened this issue May 13, 2018 · 2 comments
Closed
2 of 7 tasks

Error 500 when adding existing deploy key to project #3960

FloMiau opened this issue May 13, 2018 · 2 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@FloMiau
Copy link

FloMiau commented May 13, 2018

  • Gitea version (or commit ref): 1546458 / 1.4.1
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04.4 LTS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
==> xorm.log <==
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `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`, `description`, `num_teams`, `num_members`, `diff_view_style` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{1}
2018/05/13 13:02:34 [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) []interface {}{1, 0x1}
2018/05/13 13:02:34 [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_bare`, `is_mirror`, `is_fork`, `fork_id`, `size`, `created_unix`, `updated_unix` FROM `repository` WHERE `owner_id`=? AND `lower_name`=? LIMIT 1 []interface {}{1, "test1"}
2018/05/13 13:02:34 [I] [SQL] SELECT count(*) FROM `release` WHERE repo_id=? AND is_draft=? []interface {}{22, false}
2018/05/13 13:02:34 [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}
2018/05/13 13:02:34 [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_bare`, `is_mirror`, `is_fork`, `fork_id`, `size`, `created_unix`, `updated_unix` FROM `repository` WHERE (owner_id=? AND fork_id=?) LIMIT 1 []interface {}{2, 22}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `user_id`, `repo_id` FROM `watch` WHERE `user_id`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 22}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `uid`, `repo_id` FROM `star` WHERE `uid`=? AND `repo_id`=? LIMIT 1 []interface {}{1, 22}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{22}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `repo_id`, `type`, `config`, `created_unix` FROM `repo_unit` WHERE (repo_id = ?) []interface {}{22}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `key_id`, `repo_id`, `name`, `fingerprint`, `mode`, `created_unix`, `updated_unix` FROM `deploy_key` WHERE (repo_id = ?) []interface {}{22}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `owner_id`, `name`, `fingerprint`, `content`, `mode`, `type`, `created_unix`, `updated_unix` FROM `public_key` WHERE `fingerprint`=? AND `mode`=? AND `type`=? LIMIT 1 []interface {}{"SHA256:wJ20x1yZnKtV3T8E6Aet6v7iAtSsi1/qCFWDIXit5rA", 1, 2}
2018/05/13 13:02:34 [I] [SQL] BEGIN TRANSACTION
2018/05/13 13:02:34 [I] [SQL] INSERT INTO `public_key` (`owner_id`,`name`,`fingerprint`,`content`,`mode`,`type`,`created_unix`,`updated_unix`) VALUES (?, ?, ?, ?, ?, ?, ?, ?) []interface {}{0, "ubuntutest", "SHA256:wJ20x1yZnKtV3T8E6Aet6v7iAtSsi1/qCFWDIXit5rA", "ssh-rsa ..key..", 1, 2, 1526209354, 1526209354}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `key_id`, `repo_id`, `name`, `fingerprint`, `mode`, `created_unix`, `updated_unix` FROM `deploy_key` WHERE (key_id = ? AND repo_id = ?) LIMIT 1 []interface {}{9, 22}
2018/05/13 13:02:34 [I] [SQL] SELECT `id`, `key_id`, `repo_id`, `name`, `fingerprint`, `mode`, `created_unix`, `updated_unix` FROM `deploy_key` WHERE (repo_id = ? AND name = ?) LIMIT 1 []interface {}{22, "ubuntutest"}
2018/05/13 13:02:34 [I] [SQL] ROLL BACK

Description

I tried to add a deploy key with different read/write settings to multiple repositories:

  1. add deploy key to repository 1 as read/write
  2. add deploy key to repository 1 again

Result:
website shows error 500

Screenshots

gitea3

@techknowlogick techknowlogick added type/bug topic/ui Change the appearance of the Gitea UI labels Jun 27, 2018
@stale
Copy link

stale bot commented Jan 20, 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 stale bot added the issue/stale label Jan 20, 2019
@adelowo
Copy link
Member

adelowo commented Jan 20, 2019

This was fixed by #4945

@stale stale bot removed the issue/stale label Jan 20, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

3 participants