key length is not enough: got 2048, needs 3071 when adding a new ssh key #12333

Closed
opened 2025-11-02 10:05:56 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @laplantePierre on GitHub (Jan 13, 2024).

Description

wxiaoguang wrote in a closed issue to change my key everywhere.

See https://github.com/go-gitea/gitea/issues/28777

This is not a solution it's a workaround. Can you fix this bug ? and permit shorter key length?

Gitea Version

Gitea version 1.22.0+dev-535-g34a068439 built with GNU Make 4.3, go1.21.5 : bindata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

no

Screenshots

See https://github.com/go-gitea/gitea/issues/28777

Git Version

git version 2.39.3

Operating System

nux eris.plcb.ca 5.14.0-362.13.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 21 07:12:43 EST 2023 x86_64 x86_64 x86_64 GNU/Linux

How are you running Gitea?

wget -O gitea https://dl.gitea.com/gitea/main/gitea-main-nightly-linux-amd64

Database

MySQL/MariaDB

Originally created by @laplantePierre on GitHub (Jan 13, 2024). ### Description [wxiaoguang](https://github.com/wxiaoguang) wrote in a closed issue to change my key everywhere. See https://github.com/go-gitea/gitea/issues/28777 This is not a solution it's a workaround. Can you fix this bug ? and permit shorter key length? ### Gitea Version Gitea version 1.22.0+dev-535-g34a068439 built with GNU Make 4.3, go1.21.5 : bindata, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist no ### Screenshots See https://github.com/go-gitea/gitea/issues/28777 ### Git Version git version 2.39.3 ### Operating System nux eris.plcb.ca 5.14.0-362.13.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 21 07:12:43 EST 2023 x86_64 x86_64 x86_64 GNU/Linux ### How are you running Gitea? wget -O gitea https://dl.gitea.com/gitea/main/gitea-main-nightly-linux-amd64 ### Database MySQL/MariaDB
GiteaMirror added the issue/needs-feedback label 2025-11-02 10:05:56 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jan 13, 2024):

See the app.example.ini

https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini#L1361

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[ssh.minimum_key_sizes]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Define allowed algorithms and their minimum key length (use -1 to disable a type)
;RSA = 3071 ; we allow 3071 here because an otherwise valid 3072 bit RSA key can be reported as having 3071 bit length

and

https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini#L234

;; Indicate whether to check minimum key size with corresponding type
;MINIMUM_KEY_SIZE_CHECK = false
@wxiaoguang commented on GitHub (Jan 13, 2024): See the app.example.ini https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini#L1361 ``` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;[ssh.minimum_key_sizes] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Define allowed algorithms and their minimum key length (use -1 to disable a type) ;RSA = 3071 ; we allow 3071 here because an otherwise valid 3072 bit RSA key can be reported as having 3071 bit length ``` and https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini#L234 ``` ;; Indicate whether to check minimum key size with corresponding type ;MINIMUM_KEY_SIZE_CHECK = false ```
Author
Owner

@laplantePierre commented on GitHub (Jan 13, 2024):

Yes this fix the problem. thanks.

@laplantePierre commented on GitHub (Jan 13, 2024): Yes this fix the problem. thanks.
Author
Owner

@laplantePierre commented on GitHub (Jan 13, 2024):

Thanks

@laplantePierre commented on GitHub (Jan 13, 2024): Thanks
Author
Owner

@github-actions[bot] commented on GitHub (Mar 1, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Mar 1, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12333