title | intro | redirect_from | versions | topics | shortTitle | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Remembering your GitHub username or email |
Are you signing in to {% data variables.product.prodname_dotcom %} for the first time in a while? If so, welcome back! If you can't remember the username for your personal account on {% data variables.product.product_name %}, you can try these methods for remembering it. |
|
|
|
Find your username or email |
{% mac %}
- In the GitHub Desktop menu, click Preferences.
- In the Preferences window, verify the following:
- To view your {% data variables.product.product_name %} username, click Accounts.
- To view your Git email, click Git. Note that this email is not guaranteed to be your primary {% data variables.product.product_name %} email.
{% endmac %}
{% windows %}
- In the File menu, click Options.
- In the Options window, verify the following:
- To view your {% data variables.product.product_name %} username, click Accounts.
- To view your Git email, click Git. Note that this email is not guaranteed to be your primary {% data variables.product.product_name %} email.
{% endwindows %}
During set up, you may have set your username in Git. If so, you can review the value of this configuration setting:
$ git config user.name
# View the setting
YOUR-USERNAME
If you have any local copies of personal repositories you have created or forked, you can check the URL of the remote repository.
{% tip %}
Tip: This method only works if you have an original repository or your own fork of someone else's repository. If you clone someone else's repository, their username will show instead of yours. Similarly, organization repositories will show the name of the organization instead of a particular user in the remote URL.
{% endtip %}
$ cd YOUR-REPOSITORY
# Change directories to the initialized Git repository
$ git remote -v
origin https://{% data variables.product.product_url %}/YOUR-USERNAME/YOUR-REPOSITORY.git (fetch)
origin https://{% data variables.product.product_url %}/YOUR-USERNAME/YOUR-REPOSITORY.git (push)
Your user name is what immediately follows the https://{% data variables.product.product_url %}/
.
{% ifversion fpt or ghec %}
- "AUTOTITLE" {% endif %}