Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git cli: get user info from username

Is there a way to get the name of the user, given only their username?

Something like this output git show <username> (I know this doesn't work)

username: username name: First Last email: email@address 

I know I can do this with a GitHub api call, but would prefer to keep it within the CLI.

like image 972
cwhelms Avatar asked Sep 26 '11 07:09

cwhelms


People also ask

What is my git username and password in terminal?

In your terminal, navigate to the repo you want to make the changes in. Execute git config --list to check current username & email in your local repo. Per repo basis you could also edit . git/config manually instead.

How do I find my git credentials?

With the default configuration of git on windows, this is stored in Windows under: control panel => User => Credential manager .

How do I see my git config?

If you want to check your configuration settings, you can use the git config --list command to list all the settings Git can find at that point: $ git config --list user.name=John Doe user.


2 Answers

git config user.name git config user.email 

I believe these are the commands you are looking for.

Here is where I found them

like image 181
NewPersona Avatar answered Nov 07 '22 19:11

NewPersona


git config --list

git config -l

will display your username and email together, along with other info

like image 38
Paul Avatar answered Nov 07 '22 20:11

Paul