Error when adding ed25519-sk ssh key

Bug first reported and full described on github, however it looks dead over there.

No problems adding rsa and ed25519 ssh keys however when I try to add a ed25519 key that is signed with a security key (yubikey) I get a page with a big 500 error with the following message:
An error has occurred : addKey: fail to parse public key: exit status 255 - /tmp/382428693/id_rsa.pub is not a public key file.

System info and more info :
Gogs version and commit
Application version
0.12.3
Git version
2.20.1
Go version
go1.15
Build time
2020-10-07 03:43:11 UTC
Build commit
f0e3cd9

Operating system
Tested on Two machines

  1. Arch linux running docker container of gogs

Arch info:

Linux 5.14.2-arch1-2 x86_64

NAME=“Arch Linux”
PRETTY_NAME=“Arch Linux”
ID=arch
BUILD_ID=rolling

Docker Server info
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d88bc
Built: Wed Aug 4 10:58:48 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.5.5
GitCommit: 72cec4be58a9eb6b2910f5d10f1c01ca47d231c0.m
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2d
docker-init:
Version: 0.19.0
GitCommit: de40ad0

  1. Raspberry pi running raspbian (debian) as a service (no docker)

Linux 5.10.60+ #1449 Wed Aug 25 14:59:20 BST 2021 armv6l GNU/Linux

PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

Database
both running same version of mariaDB however Arch system has mariaDB container and raspbian is running mariaDB as service

MARIADB_MAJOR | 10.6
MARIADB_VERSION | 1:10.6.4+maria~focal

To Reproduce
Steps to reproduce the behavior:

  1. go to UserProfile >> Your Settings
  2. SSH Keys
  3. Add key (key must be hardware key signed ed25519)

Can you reproduce the bug at https://try.gogs.io?
yes you can use any account to try this I made a test key you can try with :
[email protected] AAAAGnNrLXNzaC1lZDI1NTE5Q…tks394GrKlnwboHw7mxAAAABHNzaDo= [email protected]

Expected behavior
Should have added an SSH key to be used to authenticate myself

Actual behavior
500 error with message :
An error has occurred : addKey: fail to parse public key: exit status 255 - /tmp/382428693/id_rsa.pub is not a public key file.