H
H
hulktoster2020-05-27 15:54:08
git
hulktoster, 2020-05-27 15:54:08

How to find out which global user.name and global user.email and how to switch to the old github account?

On the new account I created:

2)Set your username:
git config --global user.name "FIRST_NAME LAST_NAME"
3)Set your email address:
git config --global user.email "[email protected]"

And now when I I connected to the old account on github and tried to push it to github in github, I got an error:

remote: Permission to OldAccount ...... git denied to NewAccount.
fatal: unable to access ' https://github.com/.........git/ ': The requested URL returned error:


403 And how to switch?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2020-05-27
@bingo347

git config --global --get user.name
git config --global --get user.email

This has nothing to do with the github account, everything is stored locally on your computer
Global configs are in the $HOME/.gitconfig file
Local - in the nearest .git folder up the tree

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question