Test_SSHParsePublicKey & Test_calcFingerprint failing with v1.22.1 #13282

Closed
opened 2025-11-02 10:37:17 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Antiz96 on GitHub (Jul 12, 2024).

Description

Hello,

I'm trying to build Gitea v1.22.1 on Arch-Linux using this PKGBUILD (which contains the build and test instructions) but the Test_SSHParsePublicKey & Test_calcFingerprint tests are failing during make test with the following error:

--- FAIL: Test_SSHParsePublicKey (0.02s)
    --- FAIL: Test_SSHParsePublicKey/dsa-1024 (0.01s)
        --- FAIL: Test_SSHParsePublicKey/dsa-1024/SSHKeygen (0.01s)
            ssh_key_test.go:54:
                        Error Trace:    /build/gitea/src/gitea/models/asymkey/ssh_key_test.go:54
                        Error:          %v
                        Test:           Test_SSHParsePublicKey/dsa-1024/SSHKeygen
                        Messages:       fail to parse public key: exec(6690e23b-34:SSHKeyGenParsePublicKey) failed: exit status 255(<nil>) stdout:  stderr: /tmp/gitea_keytest1623655349 is not a public key file.
                                         - /tmp/gitea_keytest1623655349 is not a public key file.
--- FAIL: Test_calcFingerprint (0.01s)
    --- FAIL: Test_calcFingerprint/dsa-1024 (0.00s)
        --- FAIL: Test_calcFingerprint/dsa-1024/SSHKeygen (0.00s)
            ssh_key_test.go:194:
                        Error Trace:    /build/gitea/src/gitea/models/asymkey/ssh_key_test.go:194
                        Error:          Received unexpected error:
                                        Unable to verify key content [result: /tmp/gitea_keytest3103963148 is not a public key file.
                                        ]
                        Test:           Test_calcFingerprint/dsa-1024/SSHKeygen
            ssh_key_test.go:195:
                        Error Trace:    /build/gitea/src/gitea/models/asymkey/ssh_key_test.go:195
                        Error:          Not equal:
                                        expected: "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc"
                                        actual  : ""

                                        Diff:
                                        --- Expected
                                        +++ Actual
                                        @@ -1 +1 @@
                                        -SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc
                                        +
                        Test:           Test_calcFingerprint/dsa-1024/SSHKeygen
FAIL

Full test logs are available in the Log Gist below.

I remain available if you need any additional information :)

Gitea Version

v1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/Antiz96/075b96710a491e1df2d4510955a52abf#file-check-logs

Screenshots

No response

Git Version

2.45.2

Operating System

Arch Linux

How are you running Gitea?

NA

Database

None

Originally created by @Antiz96 on GitHub (Jul 12, 2024). ### Description Hello, I'm trying to build Gitea v1.22.1 on Arch-Linux using [this PKGBUILD](https://gist.github.com/Antiz96/075b96710a491e1df2d4510955a52abf#file-pkgbuild) (which contains the build and test instructions) but the `Test_SSHParsePublicKey` & `Test_calcFingerprint` tests are failing during `make test` with the following error: ``` --- FAIL: Test_SSHParsePublicKey (0.02s) --- FAIL: Test_SSHParsePublicKey/dsa-1024 (0.01s) --- FAIL: Test_SSHParsePublicKey/dsa-1024/SSHKeygen (0.01s) ssh_key_test.go:54: Error Trace: /build/gitea/src/gitea/models/asymkey/ssh_key_test.go:54 Error: %v Test: Test_SSHParsePublicKey/dsa-1024/SSHKeygen Messages: fail to parse public key: exec(6690e23b-34:SSHKeyGenParsePublicKey) failed: exit status 255(<nil>) stdout: stderr: /tmp/gitea_keytest1623655349 is not a public key file. - /tmp/gitea_keytest1623655349 is not a public key file. --- FAIL: Test_calcFingerprint (0.01s) --- FAIL: Test_calcFingerprint/dsa-1024 (0.00s) --- FAIL: Test_calcFingerprint/dsa-1024/SSHKeygen (0.00s) ssh_key_test.go:194: Error Trace: /build/gitea/src/gitea/models/asymkey/ssh_key_test.go:194 Error: Received unexpected error: Unable to verify key content [result: /tmp/gitea_keytest3103963148 is not a public key file. ] Test: Test_calcFingerprint/dsa-1024/SSHKeygen ssh_key_test.go:195: Error Trace: /build/gitea/src/gitea/models/asymkey/ssh_key_test.go:195 Error: Not equal: expected: "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc" actual : "" Diff: --- Expected +++ Actual @@ -1 +1 @@ -SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc + Test: Test_calcFingerprint/dsa-1024/SSHKeygen FAIL ``` Full test logs are available in the Log Gist below. I remain available if you need any additional information :) ### Gitea Version v1.22.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/Antiz96/075b96710a491e1df2d4510955a52abf#file-check-logs ### Screenshots _No response_ ### Git Version 2.45.2 ### Operating System Arch Linux ### How are you running Gitea? NA ### Database None
GiteaMirror added the type/bug label 2025-11-02 10:37:17 -06:00
Author
Owner

@techknowlogick commented on GitHub (Jul 13, 2024):

Thanks for the report @Antiz96. I'm wondering since those keys that are being tested are DSA-1024 and they shouldn't really be used that on newer versions of ssh-keygen being used have those disabled (or hidden behind some flag).
I think we should probably stop testing against them (by either disabling the test or by testing against different, stronger, keys), as they are already below our default minimum.

@techknowlogick commented on GitHub (Jul 13, 2024): Thanks for the report @Antiz96. I'm wondering since those keys that are being tested are DSA-1024 and they shouldn't really be used that on newer versions of ssh-keygen being used have those disabled (or hidden behind some flag). I think we should probably stop testing against them (by either disabling the test or by testing against different, stronger, keys), as they are already below our default minimum.
Author
Owner

@Antiz96 commented on GitHub (Aug 4, 2024):

Alright, thanks for the info! Makes sense.

I disabled those two tests on Arch side for now.

@Antiz96 commented on GitHub (Aug 4, 2024): Alright, thanks for the info! Makes sense. I [disabled those two tests](https://gitlab.archlinux.org/archlinux/packaging/packages/gitea/-/commit/decc374eee01d5e49c5c67169b75922d3ba84099) on Arch side for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13282