Fingerprint cannot be generated for specific ed25519 public key
Summary
Attempted to add a new ed25519 key to GitLab as a deploy key for specific repository, but returned an error. Turns out, only this specific key causes this issue. Unable to reproduce with other keys.
Expected Result
SSH Public key added as deploy key
Returned Result
Error returned: "Fingerprint cannot be generated..."
Reproduce
-
Go to page to add deploy key for specific project
-
Attempt to add the following ssh public key as a deploy key:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIACf9lz1m7U/sTRyBkxhHDR0ncKIr0NIKzgfe3sQbUnN test@dev
-
Observe error returned
-
Next, generate a brand new ssh-ed25519 key:
ssh-keygen -t ed25519 -q -f ./testkey -P ""
cat ./testkey.pub
-
Add this newly generated key.
-
Observe it probably works with this new key.
More Details
Would consider this a very low priority issue, since simply generating a new key solves the problem. Hopefully not related to a larger issue.
On first observance I assumed this might be a decoding issue due to special '/' character in public key, since this is not present on every key. Though I was able to confirm a second key containing this character works just fine.
Also can confirm the public key I have provided is valid and was directly generated by ssh-keygen
:
$ echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIACf9lz1m7U/sTRyBkxhHDR0ncKIr0NIKzgfe3sQbUnN test@dev" | ssh-keygen -l -f -
256 SHA256:YXU8GrcSG/mC6HXrHmvzpgT2CDeS83X02lGzf00tzmo test@dev (ED25519)