
Adopté un enfoque relativamente simple para intentar clonar de forma segura mi repositorio de GitHub, pero sigo teniendo problemas.
En Mi Mac ejecuté especificando el nombre como MyKey y sin contraseña
ssh-keygen -t rsa
Subí el contenido de la clave pública a GitHub con acceso de lectura y escritura. Luego ejecuté los siguientes comandos en mi servidor:
cat > /root/.ssh/github.id_rsa << EOF
-----BEGIN OPENSSH PRIVATE KEY-----
The private key
-----END OPENSSH PRIVATE KEY-----
EOF
chmod 600 /root/.ssh/github.id_rsa
cat > /root/.ssh/config << EOF
Host github.com
Hostname github.com
IdentityFile ~/.ssh/github.id_rsa
EOF
chmod 600 /root/.ssh/config
git clone [email protected]:myname/myproject.git /var/www/test
Sin embargo, el error que recibo es:
Cloning into '/var/www/test'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
¿Dónde podría haberme equivocado?