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: 
You can try this to get infos like:

* username: `git config --get user.name`
* user email: `git config --get user.email`

There's nothing like "first name" and "last name" for the user.

Hope this will help.
Old thread, but since it's still the first hit on Google search, I'll add my two cents. Most answers are technically not correct. As [@knittl](https://stackoverflow.com/a/7552869/226819) indicated: to get the username, you'll have to query the service hosting your code, as git itself has no notion of users. You can configure variables like the `user.name`, but this can be anything and is not necessarily the user creating the commit.

For Github, a way to get the actual username is through their CLI tool [gh](https://github.com/cli/cli). Once downloaded and authenticated, you can issue the following to get the username (using [jq](https://stedolan.github.io/jq/) to retrieve the name):

`gh api 'https://api.github.com/user' | jq .login`