0

I just getting started using SSH keys due to managing multiple accounts in a single mac. It works very well when I tried to clone with SSH. However, when I tried to add a remote repository using SSH (git remote add origin git@github.com:jiwanjeon/26-django-practice.git) and push my files. It shows up this error message "git@github.com: Permission denied (publickey). fatal: Could not read from remote repository."

I googled so many times but I am not sure how to deal with it...

  • What I tried to : I made a new SSH Key and add it in its' repository Deploy Key but it didn't work as well.

enter image description here

edit 1) : I also tried to make a new SSH Keys and copy and paste it, also didn't work

edit 2) When I tried to git add repository through HTTP not a SSH. It works as well but I am not sure why SSH didn't work even I add a SSH Keys...

I would appreciate your help!

JiwanJeon94
  • 385
  • 4
  • 12
  • https://stackoverflow.com/search?q=%5Bgit%5D+%5Bssh%5D+deploy+key+push – phd Feb 07 '22 at 01:38
  • Deployment keys are read only. You can clone but cannot push with them. You need to remove deployment keys and add your key to your profile. – phd Feb 07 '22 at 01:39

1 Answers1

1

To use a remote repository, you must only make sure that you have SSH access to your server. Once there, you can follow these steps to create your remote repository in the link below. https://www.inmotionhosting.com/support/website/git/setting-up-your-remote-repository-with-git/

Osiyomeoh
  • 42
  • 2