1

I created a GitHub account and then a repository named who-dare-wins. Then in command prompt I clone the by using git clone https://github.com/MidhuCherian/who-dare-wins.git. After that I add the files using git add ., then commit by using git commit -m "commit".Then I tried to push the code to remote repository by using git push -u origin master,but it showing an error as follows:

remote: Permission to MidhuCherian/who-dare-wins.git denied to MidhuJames.
fatal: unable to access 'https://github.com/MidhuCherian/who-dare-wins.git/': The requested URL returned error: 403

How can I rectify my error?

Smelly
  • 19
  • 2
Midhu James
  • 73
  • 1
  • 4
  • 1
    The `403` is indicating that it is forbidden (as I am sure you're aware too). Try using SSH instead; I strongly believe will work. Just in case you're not sure how: https://help.github.com/articles/connecting-to-github-with-ssh/ It should work with HTTPS though. – jburtondev Sep 05 '18 at 21:41
  • Possible duplicate of [Pushing to Git returning Error Code 403 fatal: HTTP request failed](https://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed) – phd Sep 05 '18 at 21:53
  • https://stackoverflow.com/search?q=%5Bgit%5D+The+requested+URL+returned+error%3A+403 – phd Sep 05 '18 at 21:53

1 Answers1

0

you are getting this message because of --global email and name problems. to solve this problem, before git push use the following two commands given below

git config --global user.name Your Name
git config --global user.email yourmail@gmail.com 

here email that is used by you to make your Github account. You can find out your email at git hub sittings tab.
now finally use git push to commit your changes in the online repository.

If you still fail and 403 error then you should use SSH(shell command) for pushing data into GitHub

Ariful Islam
  • 696
  • 6
  • 11