3
respostas

[Bug] Não consigo acessar o repositório remoto

Quero conseguir conectar meu github com o computador. Porém, não estou conseguindo.

Estou com a WSL instalada:

Insira aqui a descrição dessa imagem para ajudar na acessibilidadeInsira aqui a descrição dessa imagem para ajudar na acessibilidade

debug1: Connecting to github.com [20.201.28.151] port 22.
debug1: Connection established.
debug1: identity file /home/leticia/.ssh/id_rsa type 0
debug1: identity file /home/leticia/.ssh/id_rsa-cert type -1
debug1: identity file /home/leticia/.ssh/id_ecdsa type -1
debug1: identity file /home/leticia/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/leticia/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/leticia/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/leticia/.ssh/id_ed25519 type -1
debug1: identity file /home/leticia/.ssh/id_ed25519-cert type -1
debug1: identity file /home/leticia/.ssh/id_ed25519_sk type -1
debug1: identity file /home/leticia/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/leticia/.ssh/id_xmss type -1
debug1: identity file /home/leticia/.ssh/id_xmss-cert type -1
debug1: identity file /home/leticia/.ssh/id_dsa type -1
debug1: identity file /home/leticia/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
debug1: Remote protocol version 2.0, remote software version babeld-70f1bac9
debug1: compat_banner: no match: babeld-70f1bac9
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /home/leticia/.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: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
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
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM
debug1: load_hostkeys: fopen /home/leticia/.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 'github.com' is known and matches the ECDSA host key.
debug1: Found key in /home/leticia/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: /home/leticia/.ssh/id_rsa RSA SHA256:eq1tO9LWGwk1dx1wpMEW8JKy9aUmgoXqKjBS/B1sBzg agent
debug1: Will attempt key: /home/leticia/.ssh/id_ecdsa
debug1: Will attempt key: /home/leticia/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/leticia/.ssh/id_ed25519
debug1: Will attempt key: /home/leticia/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/leticia/.ssh/id_xmss
debug1: Will attempt key: /home/leticia/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-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-rsa-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/leticia/.ssh/id_rsa RSA SHA256:eq1tO9LWGwk1dx1wpMEW8JKy9aUmgoXqKjBS/B1sBzg agent
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/leticia/.ssh/id_ecdsa
debug1: Trying private key: /home/leticia/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/leticia/.ssh/id_ed25519
debug1: Trying private key: /home/leticia/.ssh/id_ed25519_sk
debug1: Trying private key: /home/leticia/.ssh/id_xmss
debug1: Trying private key: /home/leticia/.ssh/id_dsa
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey).
3 respostas

Esse é o erro que aparece quando tento conectar (o código acima).

Apesar de ter cadastrado a chave ssh no github, quando tento estabelecer a conexão no computador eu não consigo.

Tentei estabelecer utilizando o comando: ssh-add -l -E sha256

Ele me mostra uma chave diferente da que eu encontro na pasta .ssh

E mesmo quando tento cadastrar esse ssh diferente no site do github, eu recebo um erro dizendo que preciso cadastrar uma chave ssh valida.

Não sei mais o que fazer, preciso fazer um projeto e não consigo clonar do github para atender aos requisitos do projeto.

Insira aqui a descrição dessa imagem para ajudar na acessibilidade

Oii, Matheus! Tudo bem?

Você pode verificar se o repositório remoto está certinho? Se não é privado, por exemplo, se ainda está no ar etc.

Uma das causas pode ser isso, na realidade.

Abraço!