Unable to pull via ssh + ssh key

i create & added 2 different ssh keys to gitea:

  1. created via ssh-keygen -b 4096

  2. created via: ssh-keygen -t ed25519 -C “myemail@gmail.com

both keys are created without passphrase

i set the gitea log level to debug

and i tried to clone an existing repository using ssh, gitea side shows the following logs:


2024/04/07 05:08:21 modules/ssh/ssh.go:168:publicKeyHandler() [D] Handle Public Key: Fingerprint: SHA256:[ANONYMIZED] from [ANONYMIZED_IP]:[ANONYMIZED_PORT]

2024/04/07 05:08:21 modules/ssh/ssh.go:252:publicKeyHandler() [D] Handle Public Key: [ANONYMIZED_IP]:[ANONYMIZED_PORT] Fingerprint: SHA256:[ANONYMIZED] is not a certificate

2024/04/07 05:08:21 modules/ssh/ssh.go:267:publicKeyHandler() [D] Successfully authenticated: [ANONYMIZED_IP]:[ANONYMIZED_PORT] Public Key Fingerprint: SHA256:[ANONYMIZED]

on ssh/git side:

git clone via ssh logs:


Cloning into 'persone'...

OpenSSH_9.6p1, LibreSSL 3.3.6

debug1: Reading configuration data /Users/atlasloewenherz/.ssh/config

debug3: /Users/atlasloewenherz/.ssh/config line 1: Including file /Users/atlasloewenherz/.colima/ssh_config depth 0

debug1: Reading configuration data /Users/atlasloewenherz/.colima/ssh_config

debug1: /Users/atlasloewenherz/.ssh/config line 3: Applying options for *

debug1: /Users/atlasloewenherz/.ssh/config line 48: Applying options for git.domain.tld

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files

debug1: /etc/ssh/ssh_config line 54: Applying options for *

debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/atlasloewenherz/.ssh/known_hosts'

debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/atlasloewenherz/.ssh/known_hosts2'

debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling

debug3: channel_clear_timeouts: clearing

debug1: Connecting to git.domain.tld port 2222.

debug1: Connection established.

debug1: identity file /Users/atlasloewenherz/.ssh/nubianlion.id_rsa type 0

debug1: identity file /Users/atlasloewenherz/.ssh/nubianlion.id_rsa-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_9.6

debug1: Remote protocol version 2.0, remote software version Go

debug1: compat_banner: no match: Go

debug3: fd 5 is O_NONBLOCK

debug1: Authenticating to git.domain.tld:2222 as 'gitea'

debug3: put_host_port: [git.domain.tld]:2222

debug3: record_hostkey: found key type RSA in file /Users/atlasloewenherz/.ssh/known_hosts:319

debug3: load_hostkeys_file: loaded 1 keys from [git.domain.tld]:2222

debug1: load_hostkeys: fopen /Users/atlasloewenherz/.ssh/known_hosts2: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory

debug3: order_hostkeyalgs: prefer hostkeyalgs: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256

debug3: send packet: type 20

debug1: SSH2_MSG_KEXINIT sent

debug3: receive packet: type 20

debug1: SSH2_MSG_KEXINIT received

debug2: local client KEXINIT proposal

debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c,kex-strict-c-v00@openssh.com

debug2: host key algorithms: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com

debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com

debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com

debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1

debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1

debug2: compression ctos: none,zlib@openssh.com,zlib

debug2: compression stoc: none,zlib@openssh.com,zlib

debug2: languages ctos:

debug2: languages stoc:

debug2: first_kex_follows 0

debug2: reserved 0

debug2: peer server KEXINIT proposal

debug2: KEX algorithms: curve25519-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,kex-strict-s-v00@openssh.com

debug2: host key algorithms: rsa-sha2-256,rsa-sha2-512,ssh-rsa

debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com

debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com

debug2: MACs ctos: hmac-sha2-256-etm@openssh.com,hmac-sha2-256,hmac-sha1

debug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha2-256,hmac-sha1

debug2: compression ctos: none

debug2: compression stoc: none

debug2: languages ctos:

debug2: languages stoc:

debug2: first_kex_follows 0

debug2: reserved 0

debug3: kex_choose_conf: will use strict KEX ordering

debug1: kex: algorithm: curve25519-sha256

debug1: kex: host key algorithm: rsa-sha2-512

debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

debug3: send packet: type 30

debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

debug3: receive packet: type 31

debug1: SSH2_MSG_KEX_ECDH_REPLY received

debug1: Server host key: ssh-rsa SHA256:govQhLhMa9mujqAygGTxQZZ8e4J2F29YJsffXwhUsXQ

debug3: put_host_port: [172.232.14.182]:2222

debug3: put_host_port: [git.domain.tld]:2222

debug3: record_hostkey: found key type RSA in file /Users/atlasloewenherz/.ssh/known_hosts:319

debug3: load_hostkeys_file: loaded 1 keys from [git.domain.tld]:2222

debug1: load_hostkeys: fopen /Users/atlasloewenherz/.ssh/known_hosts2: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory

debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory

debug1: Host '[git.domain.tld]:2222' is known and matches the RSA host key.

debug1: Found key in /Users/atlasloewenherz/.ssh/known_hosts:319

debug3: send packet: type 21

debug1: ssh_packet_send2_wrapped: resetting send seqnr 3

debug2: ssh_set_newkeys: mode 1

debug1: rekey out after 134217728 blocks

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug3: receive packet: type 21

debug1: ssh_packet_read_poll2: resetting read seqnr 3

debug1: SSH2_MSG_NEWKEYS received

debug2: ssh_set_newkeys: mode 0

debug1: rekey in after 134217728 blocks

debug3: send packet: type 5

debug3: receive packet: type 7

debug1: SSH2_MSG_EXT_INFO received

debug3: kex_input_ext_info: extension server-sig-algs

debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss>

debug3: kex_input_ext_info: extension ping@openssh.com

debug1: kex_ext_info_check_ver: ping@openssh.com=<0>

debug3: receive packet: type 6

debug2: service_accept: ssh-userauth

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug3: send packet: type 50

debug3: receive packet: type 51

debug1: Authentications that can continue: publickey

debug3: start over, passed a different list publickey

debug3: preferred publickey,keyboard-interactive,password

debug3: authmethod_lookup publickey

debug3: remaining preferred: keyboard-interactive,password

debug3: authmethod_is_enabled publickey

debug1: Next authentication method: publickey

debug3: ssh_get_authentication_socket_path: path '/private/tmp/com.apple.launchd.Hd79Czc6Dq/Listeners'

debug1: get_agent_identities: bound agent to hostkey

debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities

debug1: Will attempt key: /Users/atlasloewenherz/.ssh/nubianlion.id_rsa RSA SHA256:ducFRMZNZaac80fo4dM2KWIKnfwWksa5ISId53yHnX4 explicit

debug2: pubkey_prepare: done

debug1: Offering public key: /Users/atlasloewenherz/.ssh/nubianlion.id_rsa RSA SHA256:ducFRMZNZaac80fo4dM2KWIKnfwWksa5ISId53yHnX4 explicit

debug3: send packet: type 50

debug2: we sent a publickey packet, wait for reply

debug3: receive packet: type 60

debug1: Server accepts key: /Users/atlasloewenherz/.ssh/nubianlion.id_rsa RSA SHA256:ducFRMZNZaac80fo4dM2KWIKnfwWksa5ISId53yHnX4 explicit

debug3: sign_and_send_pubkey: using publickey with RSA SHA256:ducFRMZNZaac80fo4dM2KWIKnfwWksa5ISId53yHnX4

debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:ducFRMZNZaac80fo4dM2KWIKnfwWksa5ISId53yHnX4

debug3: send packet: type 50

debug3: receive packet: type 52

Authenticated to git.domain.tld ([172.232.14.182]:2222) using "publickey".

debug2: fd 6 setting O_NONBLOCK

debug2: fd 7 setting O_NONBLOCK

debug2: fd 8 setting O_NONBLOCK

debug1: channel 0: new session [client-session] (inactive timeout: 0)

debug3: ssh_session2_open: channel_new: 0

debug2: channel 0: send open

debug3: send packet: type 90

debug1: Entering interactive session.

debug1: pledge: filesystem

debug3: client_repledge: enter

debug3: receive packet: type 91

debug2: channel_input_open_confirmation: channel 0: callback start

debug3: ssh_get_authentication_socket_path: path '/private/tmp/com.apple.launchd.Hd79Czc6Dq/Listeners'

debug1: Requesting authentication agent forwarding.

debug2: channel 0: request auth-agent-req@openssh.com confirm 0

debug3: send packet: type 98

debug2: fd 5 setting TCP_NODELAY

debug3: set_sock_tos: set socket 5 IP_TOS 0x20

debug2: client_session2_setup: id 0

debug1: Sending environment.

debug3: Ignored env NVM_INC

debug3: Ignored env MANPATH

debug3: Ignored env TERM_PROGRAM

debug3: Ignored env NVM_CD_FLAGS

debug3: Ignored env TERM

debug3: Ignored env SHELL

debug3: Ignored env TMPDIR

debug3: Ignored env HOMEBREW_REPOSITORY

debug3: Ignored env LIBRARY_PATH

debug3: Ignored env TERM_PROGRAM_VERSION

debug3: Ignored env MCFLY_HISTORY

debug3: Ignored env SDKROOT

debug3: Ignored env TERM_SESSION_ID

debug3: Ignored env SDKMAN_PLATFORM

debug3: Ignored env ZSH

debug3: Ignored env USER

debug3: Ignored env NVM_DIR

debug3: Ignored env LS_COLORS

debug3: Ignored env COMMAND_MODE

debug3: Ignored env SDKMAN_CANDIDATES_API

debug3: Ignored env SSH_AUTH_SOCK

debug3: Ignored env MCFLY_SESSION_ID

debug3: Ignored env CPATH

debug3: Ignored env __CF_USER_TEXT_ENCODING

debug3: Ignored env MCFLY_HISTFILE

debug3: Ignored env VIRTUAL_ENV_DISABLE_PROMPT

debug3: Ignored env PAGER

debug3: Ignored env LSCOLORS

debug3: Ignored env PATH

debug3: Ignored env _

debug3: Ignored env LaunchInstanceID

debug1: channel 0: setting env GIT_PROTOCOL = "version=2"

debug2: channel 0: request env confirm 0

debug3: send packet: type 98

debug3: Ignored env __CFBundleIdentifier

debug3: Ignored env PWD

debug3: Ignored env JAVA_HOME

debug3: Ignored env ITERM_PROFILE

debug3: Ignored env XPC_FLAGS

debug3: Ignored env XPC_SERVICE_NAME

debug3: Ignored env SHLVL

debug3: Ignored env PYENV_SHELL

debug3: Ignored env HOME

debug3: Ignored env COLORFGBG

debug1: channel 0: setting env LC_TERMINAL_VERSION = "3.4.23"

debug2: channel 0: request env confirm 0

debug3: send packet: type 98

debug3: Ignored env HOMEBREW_PREFIX

debug3: Ignored env GIT_SSH_COMMAND

debug3: Ignored env ITERM_SESSION_ID

debug3: Ignored env LOGNAME

debug3: Ignored env LESS

debug3: Ignored env SDKMAN_DIR

debug3: Ignored env MCFLY_HISTORY_FORMAT

debug1: channel 0: setting env LC_CTYPE = "UTF-8"

debug2: channel 0: request env confirm 0

debug3: send packet: type 98

debug3: Ignored env NVM_BIN

debug3: Ignored env SDKMAN_CANDIDATES_DIR

debug3: Ignored env INFOPATH

debug3: Ignored env HOMEBREW_CELLAR

debug1: channel 0: setting env LC_TERMINAL = "iTerm2"

debug2: channel 0: request env confirm 0

debug3: send packet: type 98

debug3: Ignored env SECURITYSESSIONID

debug3: Ignored env GIT_EXEC_PATH

debug3: Ignored env COLORTERM

debug1: Sending command: git-upload-pack '/atlasloewenherz/personecms.git'

debug2: channel 0: request exec confirm 1

debug3: send packet: type 98

debug3: client_repledge: enter

debug2: channel_input_open_confirmation: channel 0: callback done

debug2: channel 0: open confirm rwindow 2097152 rmax 32768

debug3: receive packet: type 99

debug2: channel_input_status_confirm: type 99 id 0

debug2: exec request accepted on channel 0

debug2: channel 0: rcvd ext data 40

Gitea: Internal Server Connection Error

debug2: channel 0: written 40 to efd 8

debug3: receive packet: type 98

debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

debug3: receive packet: type 97

debug2: channel 0: rcvd close

debug2: channel 0: output open -> drain

debug2: chan_shutdown_read: channel 0: (i0 o1 sock -1 wfd 6 efd 8 [write])

debug2: channel 0: input open -> closed

debug3: channel 0: will not send data after close

debug2: channel 0: obuf empty

debug2: chan_shutdown_write: channel 0: (i3 o1 sock -1 wfd 7 efd 8 [write])

debug2: channel 0: output drain -> closed

debug2: channel 0: almost dead

debug2: channel 0: gc: notify user

debug2: channel 0: gc: user detached

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

debug2: channel 0: send close

debug3: send packet: type 97

debug2: channel 0: is dead

debug2: channel 0: garbage collecting

debug1: channel 0: free: client-session, nchannels 1

debug3: channel 0: status: The following connections are open:

#0 client-session (t4 [session] r0 i3/0 o3/0 e[write]/0 fd -1/-1/8 sock -1 cc -1 io 0x00/0x00)

debug3: send packet: type 1

Transferred: sent 3876, received 2836 bytes, in 0.2 seconds

Bytes per second: sent 19068.2, received 13951.9

debug1: Exit status 1