0

I have created a blank git repo in my git account and I am trying to push the code from my local machine to it using git bash. The commands that I have used are :

* https://github.com/DevanshiParekh/new-git-project.git
* git push -u origin master

I get the following error while doing so :

$ git push -u origin master
remote: Permission to DevanshiParekh/new-git-project.git denied to debo-prk.
fatal: unable to access 'https://github.com/DevanshiParekh/new-git-project.git/': The requested URL returned error: 403

Here is my config list:

user.name=DevanshiParekh
[email protected]
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
color.ui=auto

$ git remote show origin
* remote origin
  Fetch URL: https://github.com/DevanshiParekh/new-git-project.git
  Push  URL: https://github.com/DevanshiParekh/new-git-project.git
  HEAD branch: (unknown)

Can someone help me resolve this error? Thanks in advance.

7
  • 1
    can someone explain me where could "denied to debo-prk" be coming from ? Commented Nov 5, 2017 at 14:08
  • I was just going to ask you that, it really seems strange to me :/( Commented Nov 5, 2017 at 14:09
  • what is your login on the local machine? Commented Nov 5, 2017 at 14:10
  • yea i guess that must be the issue , but in config and the account i hold no where this name is mentioned Commented Nov 5, 2017 at 14:11
  • What do you see when you type git config user.name and git config user.email ? Are you sure that your settings are sticking? Commented Nov 5, 2017 at 14:11

1 Answer 1

1

An https URL should query your GitHub username/password when pushing for the first time (the config user.name/user.email is irrelevant for authentication)

If it does not, then the wrong credentials are cached in the credential helper.
See the result of git config credential.helper to know which one you have.
For instance, on Windows, that would be the Windows Credential Managers.

Another cause (for your username/password to not work) would be if you have activated the 2FA. In which case, you would need to use a PTA (Personnal Access Token).

Sign up to request clarification or add additional context in comments.

1 Comment

yes there was another account logged in there ... Thank you so much for helping :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.