I've encountered a strange issue while trying to recursively clone a git repository:
# git clone --recursive [email protected]:eteran/edb-debugger.git
Initialized empty Git repository in /edb-debugger/.git/
The authenticity of host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Trying on another machine returned a different result:
$ git clone --recursive [email protected]:eteran/edb-debugger.git
Cloning into 'edb-debugger'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I'm not sure what's going on with the inconsistent errors, or why this suddenly started happening when it was working perfectly fine shortly before. There are two ( separate ) other questions ( ¹₂ ) which mention each error, however, this is encapsulates both errors in one unrelated issue.
Any clue what the problem might be?
An other easy solution instead of messing with keys...
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
You can resolve this in 2 ways:
Either, Create ssh-key and add the public key of both computers in the github account. After that this command will work
git clone --recursive [email protected]:eteran/edb-debugger.git
Or, clone using https. This will prompt for credentials enter the credentials and it will be cloned
git clone --recursive https://github.com/eteran/edb-debugger.git
In case you are having problem with already created ssh keys use this command to see if your ssh key is loaded properly and your public key is added properly in your github account. To see your loaded key:
ssh-add -l
It should list your key like this:
2048 SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /Users/<username>/.ssh/id_rsa (RSA)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With