
Das Git-Klonen mit https funktioniert auf meinem Mac-Rechner nicht, es tritt folgende Fehlermeldung auf:
akshaybandivadekar@Akshays-MacBook-Pro codebase % git clone https://github.com/lodash/lodash.git
Cloning into 'lodash'...
[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.
Aber mit ssh funktioniert es
git clone [email protected]:lodash/lodash.git
Ich habe dieses Dokument zum Einrichten des SSH-Schlüssels zu Rate gezogen: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Antwort1
Dies löst mein Problem
git config --global url."[email protected]:".insteadOf "https://github.com/"