Statement in advance:
My SSH certificate is generated correctly, and the public key has been configured on the server. The git clone command can be used in other command line tools (such as cmd and powershell).
cmd:
D:codexxx>git pull
Already up to date.
But if I open a cmd terminal in mobaxterm, I get the error:
D:code>git pull
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Why?
C:UsersXXXX.ssh>dir
2024/08/10 17:47 <DIR> .
2024/08/10 17:47 <DIR> ..
2024/07/07 15:32 40 config
2024/08/12 15:35 2,622 id_rsa
2024/08/12 15:35 586 id_rsa.pub
2024/08/19 11:57 7,231 known_hosts
2024/08/06 19:26 16,462 known_hosts.old
1