Ssh Private Repo from RaspberryPi #22730
-
So I can’t quite find the right solution, after hours searching and trying different solutions. pi@github.com: Permission denied (publickey). What am I doing wrong?! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Did you add the SSH key of the raspi to your Github account, as described here? I’d skip the |
Beta Was this translation helpful? Give feedback.
-
Thank for the reply! I did add it to my GitHub account - several times, actually. Following the steps to generate a new key a few times. I did use xclip to copy it though, but it seemed to accept it. I do get a “Hi txtack! You’ve successfully authenticated…” message after running the |
Beta Was this translation helpful? Give feedback.
-
txtack:
Wait a minute, that looks like git tries to login as the user |
Beta Was this translation helpful? Give feedback.
-
OMG I THINK THAT’S IT! I didn’t click on “use SSH” when I copied the repo link from GitHub, because I initially cloned it using HTTPS! When I switched it on my pi, I only switched https to ssh! It sounds like that should fix it, I’m now trying to remember how I changed that ssh URL and I’ll be trying it! (if you can’t tell, I’m new to this but having fun learning about it all) |
Beta Was this translation helpful? Give feedback.
-
That was it! Here’s what it was: |
Beta Was this translation helpful? Give feedback.
-
Nice, I’m glad to hear that! 😄 |
Beta Was this translation helpful? Give feedback.
Wait a minute, that looks like git tries to login as the user
pi
instead ofgit
as it should. Please checkgit remote -v
, the URL for the Github repository needs to follow the patterngit@github.com:USER/REPO.git
.