Skip to main content

此版本的 GitHub Enterprise 将停止服务 2022-06-03. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Remembering your GitHub username or email

Are you signing in to 您的 GitHub Enterprise Server 实例 for the first time in a while? If so, welcome back! If you can't remember the username for your personal account on GitHub Enterprise Server, you can try these methods for remembering it.

GitHub Desktop users

  1. In the GitHub Desktop menu, click Preferences.
  2. In the Preferences window, verify the following:

GitHub Desktop users

  1. In the File menu, click Options.
  2. In the Options window, verify the following:

Finding your username in your user.name configuration

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

Finding your username in the URL of remote repositories

If you have any local copies of personal repositories you have created or forked, you can check the URL of the remote repository.

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.

$ cd YOUR_REPOSITORY
# Change directories to the initialized Git repository
$ git remote -v
origin	https://主机名/YOUR_USERNAME/YOUR_REPOSITORY.git (fetch)
origin	https://主机名/YOUR_USERNAME/YOUR_REPOSITORY.git (push)

Your user name is what immediately follows the https://[hostname]/.