0

Thanks for reviewing my question. i'm facing issue with my git push. i have 2 github accounts, i'm accessing the 2nd account through git bash but when i'm trying to push the code in to github it is denied the request due to push request going from other account user name.. i updated the global username,email and Credential username but still i'm getting the same 403 response. please help me to resolve this issue.

GitBash commandline screen print

Satish Rongala
  • 209
  • 6
  • 19

2 Answers2

0
  1. Execute git config --list to check current username & email in your local repository.

  2. Change your username & email as desired. Set it globally or specific to the local repository:

    git config [--global] user.name "Username"

    git config [--global] user.email "Email@Adress.com"

  3. You could also edit .git/config manually instead to your desired username.

  4. Alternatively, if you push over https protocol, Github will prompt for username/password each time you push.

  5. You can just switch to https, rather than ssh. If you use https, it will respect the .git/config settings. So, in .git/config, change:

    url = git@github.com:USER/PROJECT.git

    to

    url = https://USER@github.com/USER/PROJECT.git

    or via terminal

    git remote set-url origin "Remoteurl"

  6. Github identifies you by the ssh key.

    Use ssh-add -l to determine which keys you are using, and ssh-add -d <keyfile> to remove a specific key, if it dosent work remove the 'unwanted' ssh key from ~/.ssh/config

Gary Mendonca
  • 1,925
  • 1
  • 13
  • 21
  • i dont know whether i'm seeing the correct file or not but i'm able to see only username and email..other than that there is nothing to edit – Satish Rongala Mar 16 '19 at 12:42
0

i deleted my credentials stored in the windows credentials manager.. and it resolved my problem

Satish Rongala
  • 209
  • 6
  • 19