Adding deploy key with duplicate name: unclear error message #6131

Closed
opened 2025-11-02 06:45:55 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @chrisshyi on GitHub (Oct 12, 2020).

  • Gitea version (or commit ref): 845d0afb33
  • Git version: 2.25.1
  • Operating system: Ubuntu 20.04.1
  • 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:

Description

Gitea only displays a HTTP 500 error page when the user attempts to add a deploy key that has the same name as an existing key (the keys themselves are different). I'd like to work on the displaying of a more informative error message when this occurs.

Screenshots

image

Originally created by @chrisshyi on GitHub (Oct 12, 2020). <!-- 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): 845d0afb3326f147dc78059bbdcecf45c3a9a0df - Git version: 2.25.1 - Operating system: Ubuntu 20.04.1 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description Gitea only displays a HTTP 500 error page when the user attempts to add a deploy key that has the same name as an existing key (the keys themselves are different). I'd like to work on the displaying of a more informative error message when this occurs. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![image](https://user-images.githubusercontent.com/24416618/95720457-d94f7d80-0ca3-11eb-8d10-047e4348858c.png)
GiteaMirror added the hacktoberfestgood first issue labels 2025-11-02 06:45:55 -06:00
Author
Owner

@techknowlogick commented on GitHub (Oct 12, 2020):

We'd be happy to receive a PR for this :)

@techknowlogick commented on GitHub (Oct 12, 2020): We'd be happy to receive a PR for this :)
Author
Owner

@chrisshyi commented on GitHub (Oct 12, 2020):

Fantastic. I was wondering if you could give me some tips on how I get dlv or vscode set up to debug Gitea. I tried the launch.json files provided by the project and couldn't get debugging to work on vscode.

@chrisshyi commented on GitHub (Oct 12, 2020): Fantastic. I was wondering if you could give me some tips on how I get `dlv` or `vscode` set up to debug Gitea. I tried the `launch.json` files provided by the project and couldn't get debugging to work on vscode.
Author
Owner

@6543 commented on GitHub (Oct 12, 2020):

I dont think you will have to debug a lot of go code ...
the easyest way is to add some fmt.Println(var-you-like-to-konw-value-of) in the code ...

@6543 commented on GitHub (Oct 12, 2020): I dont think you will have to debug a lot of go code ... the easyest way is to add some `fmt.Println(var-you-like-to-konw-value-of)` in the code ...
Author
Owner

@chrisshyi commented on GitHub (Oct 12, 2020):

gotcha, I'll give it a try!

@chrisshyi commented on GitHub (Oct 12, 2020): gotcha, I'll give it a try!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6131