On GitHub, "fatal: Could not read from remote repository."


At first

I've written an article on GitHub to remind you of what you should check when it comes to "fatal: Could not read from remote repository." We will add it from time to time. If you have any apologies or advice, please comment.

1. Check if the key has been added to ssh-agent

Check whether the key added to ssh-agent exists with the following command.

$ ssh-add -l

If the expected key does not exist, add a new key

$ ssh-add -K {秘密鍵へのパス}

(2022/02/16 Update) On macOS Monterey, the -K option is deprecated, so use --apple-use-keychain instead.

$ ssh-add --apple-use-keychain {秘密鍵へのパス}


Author by

Updated on February 17, 2022