[Solved] deadly: Couldn’t learn from distant repository with Git


In case you obtain the next error when attempting to clone a Git repository:

deadly: Couldn't learn from distant repository.

The complete message might look one thing like this:

$ git clone [email protected]:org/repo.git
Cloning into 'repo'...
Dangerous proprietor or permissions on /Customers/ao/.ssh/config
deadly: Couldn't learn from distant repository.

Please be sure to have the proper entry rights
and the repository exists.

Learn how to clear up this error

ssh-add ~/.ssh/id_rsa

the place id_rsa is a ssh key related to the repo.

In case you get the next error at this stage: Couldn't open a connection to your authentication agent., then you definately first must run the next:

eval `ssh-agent -s`

or:

eval $(ssh-agent -s)

Permissions 0777 for ‘/Customers/ao/.ssh/id_rsa’ are too open

In case you get this permissions error, then you’ll be able to repair the id_rsa permissions by doing this:

chmod 0400 ~/.ssh/id_rsa

Leave a Reply