Reputation: 1194
I have GIT and my repos setup on a MacBook Air. I'm trying to clone the repo on my iMac. My understanding was that I needed to copy my key over from the /.ssh folder on the MBA to the same folder iMac.
However, when I try and clone the repo on the iMac, I get the following error:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I've done a little research already and have verified that...
I have the latest version of GIT and that my user.name and user.email variables are configured correctly. (New Mac - new SSH keys for github?)
the ownership & permissions on the .gitconfig file and parent folder are r/w and owned by my user. (Trouble setting up Tower with my GitHub Account - error: could not lock config file)
my $HOME environment variable points to my users working directory. (Trouble setting up git with my GitHub Account error: could not lock config file)
At this point, I am all out of ideas and could really use some advice.
Suggestions?
Thanks!
Upvotes: 2
Views: 722
Reputation: 1194
Can't believe I found the solution right after I got done posting this, but for those who are copying keys to new machines, you have to let SSH know the keys are there. See this answer for details:
https://stackoverflow.com/a/12100237/337824
Upvotes: 1