Deployment keys should not collide with user keys #355

Closed
opened 2025-11-02 03:19:56 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @evilstiefel on GitHub (Feb 14, 2017).

  • Gitea version (or commit ref): Gitea Version: 1.0.1+1-gab4eb0da
  • Git version: git version 2.11.0
  • Operating system: Linux e94dde8df2eb 3.13.0-108-generic #155-Ubuntu
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When trying to add a SSH key, if it has been used as a deployment key on the site, the user should be warned about that collision and the key be rejected. Otherwise, pushing will simply fail with the following git output:

Gitea: Key permission denied
Cannot push with deployment key: 3
fatal: Could not read from remote repository.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Originally created by @evilstiefel on GitHub (Feb 14, 2017). - Gitea version (or commit ref): Gitea Version: 1.0.1+1-gab4eb0da - Git version: git version 2.11.0 - Operating system: Linux e94dde8df2eb 3.13.0-108-generic #155-Ubuntu - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description When trying to add a SSH key, if it has been used as a deployment key on the site, the user should be warned about that collision and the key be rejected. Otherwise, pushing will simply fail with the following git output: ``` Gitea: Key permission denied Cannot push with deployment key: 3 fatal: Could not read from remote repository. ``` <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42033468-deployment-keys-should-not-collide-with-user-keys?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github). </bountysource-plugin>
GiteaMirror added the type/feature label 2025-11-02 03:19:56 -06:00
Author
Owner

@stale[bot] commented on GitHub (Feb 17, 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 (Feb 17, 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

@lesderid commented on GitHub (Feb 17, 2019):

Has this been fixed yet?

@lesderid commented on GitHub (Feb 17, 2019): Has this been fixed yet?
Author
Owner

@zeripath commented on GitHub (Feb 17, 2019):

Yes. #5939 and #5966 should fix this.

Situations whereby there are already duplicated keys won't be fixed by this PR but new ones won't get produced.

@zeripath commented on GitHub (Feb 17, 2019): Yes. #5939 and #5966 should fix this. Situations whereby there are already duplicated keys won't be fixed by this PR but new ones won't get produced.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#355