Fix the problem 'Could not read from remote repository'

Fix the problem 'Could not read from remote repository'

Even you have generated a SSH KEY and added it to github or bitbucket, it still returns the error below:

conq: repository access denied.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The solution is after add ssh key, add you ssh key to ssh agent too (from oficial docs https://help.github.com/articles/generating-ssh-keys/)

ssh-agent -s
ssh-add ~/.ssh/id_rsa

After it, all work fine, git can view proper key, before coudn't.

blog tag: