Problems with multiple ssh keys #14207

Open
opened 2025-11-02 11:06:20 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @CapSel on GitHub (Mar 1, 2025).

Description

I can't pull from gitea. The error is:

git@domain: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

But this is not same problem as in FAQ.

I've got 2 ssh public keys for 2 computers for single user. Only second key works, first one gives me the error.

Of course I tried removing and adding this currently-not-working key again, I verified it. Then it works but the other key stops - same symptoms.

I deployed gitea with docker image "gitea/gitea". Entire configuration was done by Web UI.

Logs from gitea when there is a failure:

Connection closed by authenticating user git IP.IP.IP.IP port 58344 [preauth]

Repo has remote set with url ssh://git@domain:917/UserName/repo.git for fetch and push. As mentioned before - it works only with "last" key.

Gitea Version

1.23.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Archlinux/docker

How are you running Gitea?

docker-compose part for gitea:

  gitea:
    image: gitea/gitea
    container_name: gitea
    restart: always
    depends_on:
      - db
    env_file:
      - ./gitea.env
    volumes:
      - /srv/gitea/data:/srv/git
      - /srv/gitea/config:/data/gitea/conf
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    ports:
      - "127.0.0.1:3001:3000"
      - "917:22"

Frontend for Web UI is nginx outside of docker.

Database

PostgreSQL

Originally created by @CapSel on GitHub (Mar 1, 2025). ### Description I can't pull from gitea. The error is: ``` git@domain: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` But this is not same problem as in FAQ. I've got 2 ssh public keys for 2 computers for single user. Only second key works, first one gives me the error. Of course I tried removing and adding this currently-not-working key again, I verified it. Then it works but the other key stops - same symptoms. I deployed gitea with docker image "gitea/gitea". Entire configuration was done by Web UI. Logs from gitea when there is a failure: ``` Connection closed by authenticating user git IP.IP.IP.IP port 58344 [preauth] ``` Repo has remote set with url `ssh://git@domain:917/UserName/repo.git` for fetch and push. As mentioned before - it works only with "last" key. ### Gitea Version 1.23.4 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Archlinux/docker ### How are you running Gitea? docker-compose part for gitea: ``` gitea: image: gitea/gitea container_name: gitea restart: always depends_on: - db env_file: - ./gitea.env volumes: - /srv/gitea/data:/srv/git - /srv/gitea/config:/data/gitea/conf - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro ports: - "127.0.0.1:3001:3000" - "917:22" ``` Frontend for Web UI is nginx outside of docker. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 11:06:21 -06:00
Author
Owner

@lunny commented on GitHub (Mar 2, 2025):

Can you run git -vvv to find the permission deny reason?

@lunny commented on GitHub (Mar 2, 2025): Can you run git -vvv to find the permission deny reason?
Author
Owner

@CapSel commented on GitHub (Mar 2, 2025):

Unfortunately git pull --rebase -vvv shows nothing more then my initial report - no new lines, timestamps, characters. The output is exactly the same.
I tried adding more v and nothing changes.

@CapSel commented on GitHub (Mar 2, 2025): Unfortunately `git pull --rebase -vvv` shows nothing more then my initial report - no new lines, timestamps, characters. The output is exactly the same. I tried adding more `v` and nothing changes.
Author
Owner

@CapSel commented on GitHub (Mar 2, 2025):

Running "Update the '.ssh/authorized_keys' file with Gitea SSH keys." Caused keys to be switched again.

@CapSel commented on GitHub (Mar 2, 2025): Running "Update the '.ssh/authorized_keys' file with Gitea SSH keys." Caused keys to be switched again.
Author
Owner

@lunny commented on GitHub (Mar 2, 2025):

Unfortunately git pull --rebase -vvv shows nothing more then my initial report - no new lines, timestamps, characters. The output is exactly the same. I tried adding more v and nothing changes.

Sorry, it should be ssh -vvv. Please search how to use that.

@lunny commented on GitHub (Mar 2, 2025): > Unfortunately `git pull --rebase -vvv` shows nothing more then my initial report - no new lines, timestamps, characters. The output is exactly the same. I tried adding more `v` and nothing changes. Sorry, it should be `ssh -vvv`. Please search how to use that.
Author
Owner

@tuxdotrs commented on GitHub (Mar 3, 2025):

Facing the same issue (v1.23.4). Here's the output for ssh -vvv gitea@git.tux.rs

OpenSSH_9.9p2, OpenSSL 3.4.1 11 Feb 2025
debug1: Reading configuration data /home/tux/.ssh/config
debug1: /home/tux/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 2: Including file /nix/store/cl6fadhi66qch2nc0zmzyvxmlylp35ca-libvirt-10.10.0/etc/ssh/ssh_config.d/30-libvirt-ssh-proxy.conf depth 0
debug1: Reading configuration data /nix/store/cl6fadhi66qch2nc0zmzyvxmlylp35ca-libvirt-10.10.0/etc/ssh/ssh_config.d/30-libvirt-ssh-proxy.conf
debug1: /etc/ssh/ssh_config line 6: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/tux/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/tux/.ssh/known_hosts2'
debug2: resolving "git.tux.rs" port 22
debug3: resolve_host: lookup git.tux.rs:22
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to git.tux.rs [156.67.105.203] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/tux/.ssh/id_ed25519 type 3
debug1: identity file /home/tux/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.9
debug1: compat_banner: match: OpenSSH_9.9 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to git.tux.rs:22 as 'gitea'
debug3: record_hostkey: found key type ED25519 in file /home/tux/.ssh/known_hosts:15
debug3: load_hostkeys_file: loaded 1 keys from git.tux.rs
debug1: load_hostkeys: fopen /home/tux/.ssh/known_hosts2: No such file or directory
debug3: order_hostkeyalgs: have matching best-preference key type ssh-ed25519-cert-v01@openssh.com, using HostkeyAlgorithms verbatim
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,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,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: 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,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-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,rsa-sha2-512,rsa-sha2-256
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
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,sntrup761x25519-sha512@openssh.com,diffie-hellman-group-exchange-sha256,mlkem768x25519-sha256,sntrup761x25519-sha512,ext-info-s,kex-strict-s-v00@openssh.com
debug2: host key algorithms: ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
debug2: MACs ctos: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
debug2: MACs stoc: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
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: sntrup761x25519-sha512
debug1: kex: host key algorithm: ssh-ed25519
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-ed25519 SHA256:UYz7tTRfgTugkcPwZnKvcl4aRSoUWU2CbJiEPis1Qno
debug3: record_hostkey: found key type ED25519 in file /home/tux/.ssh/known_hosts:15
debug3: load_hostkeys_file: loaded 1 keys from git.tux.rs
debug1: load_hostkeys: fopen /home/tux/.ssh/known_hosts2: No such file or directory
debug1: Host 'git.tux.rs' is known and matches the ED25519 host key.
debug1: Found key in /home/tux/.ssh/known_hosts:15
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: Sending SSH2_MSG_EXT_INFO
debug3: send packet: type 7
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
debug2: KEX algorithms: sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,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: 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,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-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,rsa-sha2-512,rsa-sha2-256
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
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
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,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256>
debug3: kex_input_ext_info: extension publickey-hostbound@openssh.com
debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0>
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 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,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256>
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 '/run/user/1000/wezterm/agent.1407668'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: /home/tux/.ssh/id_ed25519 ED25519 SHA256:pWSDrOnWU3NfQi326Ww30rGq7ddUzmc3swfqmQe8gYo explicit agent
debug2: pubkey_prepare: done
debug1: Offering public key: /home/tux/.ssh/id_ed25519 ED25519 SHA256:pWSDrOnWU3NfQi326Ww30rGq7ddUzmc3swfqmQe8gYo explicit agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
gitea@git.tux.rs: Permission denied (publickey).
@tuxdotrs commented on GitHub (Mar 3, 2025): Facing the same issue (v1.23.4). Here's the output for `ssh -vvv gitea@git.tux.rs` ``` OpenSSH_9.9p2, OpenSSL 3.4.1 11 Feb 2025 debug1: Reading configuration data /home/tux/.ssh/config debug1: /home/tux/.ssh/config line 1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 2: Including file /nix/store/cl6fadhi66qch2nc0zmzyvxmlylp35ca-libvirt-10.10.0/etc/ssh/ssh_config.d/30-libvirt-ssh-proxy.conf depth 0 debug1: Reading configuration data /nix/store/cl6fadhi66qch2nc0zmzyvxmlylp35ca-libvirt-10.10.0/etc/ssh/ssh_config.d/30-libvirt-ssh-proxy.conf debug1: /etc/ssh/ssh_config line 6: Applying options for * debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/tux/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/tux/.ssh/known_hosts2' debug2: resolving "git.tux.rs" port 22 debug3: resolve_host: lookup git.tux.rs:22 debug3: channel_clear_timeouts: clearing debug3: ssh_connect_direct: entering debug1: Connecting to git.tux.rs [156.67.105.203] port 22. debug3: set_sock_tos: set socket 3 IP_TOS 0x48 debug1: Connection established. debug1: identity file /home/tux/.ssh/id_ed25519 type 3 debug1: identity file /home/tux/.ssh/id_ed25519-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.9 debug1: Remote protocol version 2.0, remote software version OpenSSH_9.9 debug1: compat_banner: match: OpenSSH_9.9 pat OpenSSH* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to git.tux.rs:22 as 'gitea' debug3: record_hostkey: found key type ED25519 in file /home/tux/.ssh/known_hosts:15 debug3: load_hostkeys_file: loaded 1 keys from git.tux.rs debug1: load_hostkeys: fopen /home/tux/.ssh/known_hosts2: No such file or directory debug3: order_hostkeyalgs: have matching best-preference key type ssh-ed25519-cert-v01@openssh.com, using HostkeyAlgorithms verbatim 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,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,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: 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,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-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,rsa-sha2-512,rsa-sha2-256 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 debug2: compression stoc: none,zlib@openssh.com debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,sntrup761x25519-sha512@openssh.com,diffie-hellman-group-exchange-sha256,mlkem768x25519-sha256,sntrup761x25519-sha512,ext-info-s,kex-strict-s-v00@openssh.com debug2: host key algorithms: ssh-ed25519 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr debug2: MACs ctos: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com debug2: MACs stoc: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com debug2: compression ctos: none,zlib@openssh.com debug2: compression stoc: none,zlib@openssh.com 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: sntrup761x25519-sha512 debug1: kex: host key algorithm: ssh-ed25519 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-ed25519 SHA256:UYz7tTRfgTugkcPwZnKvcl4aRSoUWU2CbJiEPis1Qno debug3: record_hostkey: found key type ED25519 in file /home/tux/.ssh/known_hosts:15 debug3: load_hostkeys_file: loaded 1 keys from git.tux.rs debug1: load_hostkeys: fopen /home/tux/.ssh/known_hosts2: No such file or directory debug1: Host 'git.tux.rs' is known and matches the ED25519 host key. debug1: Found key in /home/tux/.ssh/known_hosts:15 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: Sending SSH2_MSG_EXT_INFO debug3: send packet: type 7 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 debug2: KEX algorithms: sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,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: 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,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-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,rsa-sha2-512,rsa-sha2-256 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 debug2: compression stoc: none,zlib@openssh.com debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 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,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256> debug3: kex_input_ext_info: extension publickey-hostbound@openssh.com debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0> 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 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,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256> 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 '/run/user/1000/wezterm/agent.1407668' debug1: get_agent_identities: bound agent to hostkey debug1: get_agent_identities: agent returned 1 keys debug1: Will attempt key: /home/tux/.ssh/id_ed25519 ED25519 SHA256:pWSDrOnWU3NfQi326Ww30rGq7ddUzmc3swfqmQe8gYo explicit agent debug2: pubkey_prepare: done debug1: Offering public key: /home/tux/.ssh/id_ed25519 ED25519 SHA256:pWSDrOnWU3NfQi326Ww30rGq7ddUzmc3swfqmQe8gYo explicit agent debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey debug2: we did not send a packet, disable method debug1: No more authentication methods to try. gitea@git.tux.rs: Permission denied (publickey). ```
Author
Owner

@CapSel commented on GitHub (Mar 4, 2025):

The issue solved itself for me. My initial assumption that running "Update the '.ssh/authorized_keys' file with Gitea SSH keys." switched keys was wrong.

@CapSel commented on GitHub (Mar 4, 2025): The issue solved itself for me. My initial assumption that running "Update the '.ssh/authorized_keys' file with Gitea SSH keys." switched keys was wrong.
Author
Owner

@lunny commented on GitHub (Mar 4, 2025):

The issue solved itself for me. My initial assumption that running "Update the '.ssh/authorized_keys' file with Gitea SSH keys." switched keys was wrong.

How did you resolve the problem? Is this a bug of Gitea or could you share your workaround?

@lunny commented on GitHub (Mar 4, 2025): > The issue solved itself for me. My initial assumption that running "Update the '.ssh/authorized_keys' file with Gitea SSH keys." switched keys was wrong. How did you resolve the problem? Is this a bug of Gitea or could you share your workaround?
Author
Owner

@CapSel commented on GitHub (Mar 4, 2025):

My workaround was to go to "Site Administration" and click "Run" next to "Update the '.ssh/authorized_keys' file with Gitea SSH keys.".

I'm afraid that adding third key would break things for me again.

@CapSel commented on GitHub (Mar 4, 2025): My workaround was to go to "Site Administration" and click "Run" next to "Update the '.ssh/authorized_keys' file with Gitea SSH keys.". I'm afraid that adding third key would break things for me again.
Author
Owner

@tuxdotrs commented on GitHub (Mar 4, 2025):

My workaround was to go to "Site Administration" and click "Run" next to "Update the '.ssh/authorized_keys' file with Gitea SSH keys.".

I'm afraid that adding third key would break things for me again.

tried this and it doesn't work for me

@tuxdotrs commented on GitHub (Mar 4, 2025): > My workaround was to go to "Site Administration" and click "Run" next to "Update the '.ssh/authorized_keys' file with Gitea SSH keys.". > > I'm afraid that adding third key would break things for me again. tried this and it doesn't work for me
Author
Owner

@GiteaBot commented on GitHub (Apr 3, 2025):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Apr 3, 2025): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Author
Owner

@techknowlogick commented on GitHub (Apr 4, 2025):

When looking at the authorized keys file what does it look like? Are all the keys there?

@techknowlogick commented on GitHub (Apr 4, 2025): When looking at the authorized keys file what does it look like? Are all the keys there?
Author
Owner

@tuxdotrs commented on GitHub (Apr 4, 2025):

When looking at the authorized keys file what does it look like? Are all the keys there?

Image
Yes both my public keys are there!

@tuxdotrs commented on GitHub (Apr 4, 2025): > When looking at the authorized keys file what does it look like? Are all the keys there? ![Image](https://github.com/user-attachments/assets/e5a06881-c412-48d8-befc-3f807b711026) Yes both my public keys are there!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14207