-1

i have made discussion forum but i cannot push my project to github i have tried all method but it is still not working

i have set ssh key in github.

root@miky-Lenovo-ideapad:/opt/lampp/htdocs/discussionforum# git remote add origin git@github.com:milan2056/discussionforum.git
root@miky-Lenovo-ideapad:/opt/lampp/htdocs/discussionforum# git push -u origin master
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

i need to upload my project to github

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
atif aslam
  • 71
  • 6
  • Could you try running this command: `ssh -v git@github.com` and [edit] your question and add the output. – legoscia Oct 21 '19 at 15:41
  • do you want to be asked for username/password when pushing? (help with reverting it to https), or do you want help in setting up the ssh key on github? – Lawrence Cherone Oct 21 '19 at 15:52
  • Possible duplicate of [GitHub Error Message - Permission denied (publickey)](https://stackoverflow.com/questions/12940626/github-error-message-permission-denied-publickey) – phd Oct 21 '19 at 16:08
  • https://stackoverflow.com/search?q=%5Bgithub%5D+Permission+denied+publickey – phd Oct 21 '19 at 16:08

2 Answers2

3

Github does have some triaging steps for this error that can be found here. Given the error and the url, something likely was not configured correctly when making your SSH key. I would make sure that in your settings it says that you've actually used that ssh key in the past.

tsudodog
  • 61
  • 3
0

i was generating private key as normal user and pushing the project as a root user so i got this error

atif aslam
  • 71
  • 6