My friend set up my github for me and cloned a project onto my desktop. I want to see what is my profile name on the Github account he gave me. Is there a command to do that?
You can see the current configurations, including username, with git config -l
.
You'll want to look for user.name
, user.email
, and github.user
.
You can unset configurations using --unset
, like git config user.name --unset
.
You can also reset configurations using git config user.name "Your Name"
.
To see which user is accessing github via terminal you could try SSH
ssh -T [email protected]
You get the following response
Hi Keshavdulal! You've successfully authenticated, but GitHub does not provide shell access.
I have multiple ssh keys setup for different projects and it helps to know the current user.
git config -l | grep user.name
This will only output username
in the terminal. Similarly, for email
type:
git config -l | grep user.email
Note: This will only work on mac. For windows, refer to the comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With