Question: 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.

Answer: 
Use this to see the logged in user (the actual git account):

```
git config credential.username

```

And as other answers the user email and user name (this is differenct from user credentials):

```
git config user.name
git config user.email

```

To see the list of all configs:

```
git config --list

```
if you are using GitHub CLI (because `git` is already installed):

```
grep "user:" ~/.config/gh/hosts.yml

```

---

2022: Unless you manually set a token by hand, you need to use `gh` cli with `git` in order to be able to `git push` to your own GitHub repos. `gh` cli can be used to automatically set token credential use, as opposed to *onetime* (per login), or *everytime* (per action).

<https://github.com/cli/cli>

<https://cli.github.com>