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
xxxxxxxxxxxxx/lunch_call.git/info/refs
fatal: HTTP request failed
Jan 5, 2021 in Git & GitHub by akhtar
• 38,260 points
10,485 views

1 answer to this question.

0 votes

Hi@akhtar,

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, 2021 by MD
• 95,460 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,460 points
20,113 views
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,460 points
8,085 views
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
0 votes
1 answer
+2 votes
3 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP