Pushing to Git returning Error Code 403 fatal HTTP request failed

0 votes

Hi Team,

I was able to clone a copy of my repo over HTTPS authenticated. I've made some commits and want to push them back out to the GitHub server. But it is showing me the error.

error: The requested URL returned error: 403 while accessing https://xxxxxxxxx
fatal: HTTP request failed
Jan 5 in Git & GitHub by akhtar
• 38,210 points

1 answer to this question.

0 votes


Github seems to only support the ssh way to read&write the repo, although HTTPS way also displayed 'Read&Write'.

So you need to change your repo config on your PC to ssh way:

  1. edit .git/config file under your repo directory.

  2. find url=entry under section [remote "origin"].

  3. change it from url=https://xxxxxxxxx@github.com/xxxxxxxxxx/lunch_call.git to url=git@github.com/xxxxxxxxxxxxxx/lunch_call.git. that is, change all the texts before @ symbol to ssh://git.

  4. Save the config file and quit. now you could use git push origin master to sync your repo on GitHub.

answered Jan 5 by MD
• 95,300 points

Related Questions In Git & GitHub

+1 vote
1 answer

master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:abc70/new.git'

Hi@akhtar, To update your local repo to GitHub ...READ MORE

answered Feb 14, 2020 in Git & GitHub by MD
• 95,300 points
0 votes
1 answer
0 votes
1 answer

GIT commit Error while pushing to remote repository

Hi@Ajit, To update your local repo to GitHub, ...READ MORE

answered Jun 1, 2020 in Git & GitHub by MD
• 95,300 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
1 answer
+2 votes
3 answers