Skip to main content

Changing your GitHub username

You can change the username for your account on GitHub if your instance uses built-in authentication.

メモ

If you sign into お使いの GitHub Enterprise Server インスタンス with LDAP credentials or single sign-on (SSO), only your local administrator can change your username. For more information about authentication methods for GitHub Enterprise Server, see Enterprise 向けの IAM について.

About username changes

You can change your username to another username that is not currently in use.

After changing your username, your old username becomes available for anyone else to claim. Most references to your repositories under the old username automatically change to the new username. However, some links to your profile won't automatically redirect.

GitHub cannot set up redirects for:

  • @mentions using your old username
  • Links to gists that include your old username

GitHub Packages レジストリに格納されているパッケージまたはコンテナー イメージがアカウントの名前空間に含まれている場合、該当するパッケージとコンテナー イメージは GitHub によって新しい名前空間に転送されます。 アカウントの名前を変更すると、これらのパッケージに依存しているプロジェクトが中断される可能性があります。

Repository references

After you change your username, GitHub will automatically redirect references to your repositories.

  • Web links to your existing repositories will continue to work. This can take a few minutes to complete after you make the change.
  • Command line pushes from your local repository clones to the old remote tracking URLs will continue to work.

If the new owner of your old username creates a repository with the same name as your repository, that will override the redirect entry and your redirect will stop working. Because of this possibility, we recommend you update all existing remote repository URLs after changing your username. For more information, see リモートリポジトリを管理する.

After changing your username, links to your previous profile page, such as https://HOSTNAME/previoususername, will return a 404 error. We recommend updating any links to your profile from elsewhere.

Accounts logged in on GitHub Mobile

Accounts logged in on the GitHub Mobile app may continue to display your original username until you log out. To ensure your updated username is displayed, we recommend you sign out and back in to your account on each mobile device.

Your Git commits

If your Git commits are associated with another email address you've added to your GitHub account, they'll continue to be attributed to you and appear in your contributions graph after you've changed your username. For more information on setting your email address, see コミットメールアドレスを設定する and GitHub アカウントへのメールアドレスの追加.

警告

  • After a username change, verified commits signed using the previous GitHub-provided noreply email address will lose their "Verified" status.
  • When verifying a signature, GitHub checks that the email address of the committer or tagger exactly matches one of the email addresses associated with the GPG key's identities. Additionally, GitHub confirms that the email address is verified and linked to the user's account. This ensures that the key belongs to you and that you created the commit or tag. Because the username of the noreply email address changes, these commits can no longer be verified.

Your gists

After changing your username, the URLs to any public or secret gists will also change and previous links to these will return a 404 error. We recommend updating the links to these gists anywhere you may have shared them.

CODEOWNERS files

After changing your username, CODEOWNERS files that include your old username will need to be manually updated. When you view the CODEOWNERS files on GitHub, an error message is displayed if the file contains any unknown users, or users without write access. We recommend updating all relevant CODEOWNERS files with your new username. For more information, see コードオーナーについて.

Changing your username

  1. GitHub で、任意のページの右上隅にある自分のプロフィール写真をクリックしてから、 [設定] をクリックします。
  2. 左側のサイドバーで、[ アカウント] をクリックします。
  3. In the "Change username" section, click Change username.

Further reading