0

I have created a new account on GitHub and created a new repository. Now I want to push my localhost project in that repository.

By default it's showing master branch and when I am trying to push code getting this error in command line:

git@GitHub.Com: Permission denied (public key).
fatal: Could not read from remote repository. 

These are commands:

git add .
git commit -m "this is my first commit"
git pull origin master

I am not sure why this error is coming.

U880D
  • 8,601
  • 6
  • 24
  • 40
  • Possible duplicate of [git push: permission denied (public key)](https://stackoverflow.com/questions/19660744/git-push-permission-denied-public-key) – phd Sep 20 '19 at 11:37
  • https://stackoverflow.com/search?q=%5Bgit%5D+Permission+denied+public+key – phd Sep 20 '19 at 11:37

1 Answers1

1

Check your public key is appropriately added in your github account.

Then validate remote is added properly.

git remote -v

After validating the above then try to pull or push.

2017kamb
  • 192
  • 3
  • 8
  • 27