Как изменить username github

You can change the username for your account on GitHub.com.

About username changes

You can change your username to another username that is not currently in use. If the username you want is not available, consider other names or unique variations. Using a number, hyphen, or an alternative spelling might help you find a similar username that’s still available.

If you hold a trademark for the username, you can find more information about making a trademark complaint on our Trademark Policy page.

If you do not hold a trademark for the name, you can choose another username or keep your current username. GitHub Support cannot release the unavailable username for you. For more information, see «Changing your username.»

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

If you’re a member of an enterprise with managed users, you cannot make changes to your username. For more information, see «Types of GitHub accounts.»

If the account namespace includes any public repositories that contain an action listed on GitHub Marketplace, or that had more than 100 clones or more than 100 uses of GitHub Actions in the week prior to you renaming your account, GitHub permanently retires the old owner name and repository name combination (OLD-OWNER/REPOSITORY-NAME) when you rename your account. If you try to create a repository using a retired owner name and repository name combination, you will see the error: «The repository <REPOSITORY_NAME> has been retired and cannot be reused.»

If the account namespace includes any packages or container images stored in a GitHub Packages registry, GitHub transfers the packages and container images to the new namespace. By renaming your account, you may break projects that depend on these packages. If the namespace includes any container images that are public and have more than 5,000 downloads, the full former name of these container images (OLD-NAMESPACE/IMAGE-NAME) is permanently retired when you rename the account to ensure the container image name cannot be reused in the future.

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 «Managing remote repositories.»

Links to your previous profile page

After changing your username, links to your previous profile page, such as https://github.com/previoususername, will return a 404 error. We recommend updating any links to your account on GitHub.com from elsewhere, such as your LinkedIn or Twitter profile.

Your Git commits

Git commits that were associated with your GitHub-provided noreply email address won’t be attributed to your new username and won’t appear in your contributions graph. If your Git commits are associated with another email address you’ve added to your GitHub account, including the ID-based GitHub-provided noreply email address, 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 «Setting your commit email address.»

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.

Changing your username

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Settings icon in the user bar

  2. In the left sidebar, click Account.

  3. In the «Change username» section, click Change username.
    Change Username button

  4. Read the warnings about changing your username. If you still want to change your username, click I understand, let’s change my username.
    Change Username warning button

  5. Type a new username.
    New username field

  6. If the username you’ve chosen is available, click Change my username. If the username you’ve chosen is unavailable, you can try a different username or one of the suggestions you see.
    Change Username warning button

Further reading

  • «Why are my commits linked to the wrong user?»
  • «GitHub Username Policy»

A quick guide to changing your GitHub username

Some additional steps to consider after making a change to your username on GitHub.

This being the 2,38947234th and probably last time I’ll change my username, (marriage is permanent, right?) I thought I’d better write a quick post on how this transition can be achieved as smoothly as possible. You can read official instructions on how to change your GitHub username here, and they will tell you how to do it and what happens. The following is a quick guide to some things to consider afterwards.

Where to make changes

  1. Change username in GitHub account settings.
  2. If using GitHub Pages, change name of your “username.github.io” repository.
  3. If using other services that point to your “username.github.io” repository address, update them.
  4. If using Netlify, you may want to sign in and reconnect your repositories. (Mine still worked, but due to a possibly unrelated issue, I’m not positive.)
  5. Sign in to Travis CI and other integrations (find them in your repository Settings tab -> Integrations & services). This will update your username there.
  6. Update your local files and repository links with very carefully executedfind and sed commands, and push back changes to GitHub.
  7. Redeploy any websites you may have with your updated GitHub link.
  8. Fix any links around the web to your profile, your repositories, or Gists you may have shared.

Local file updates

Here are some suggestions for strings to search and replace your username in.

  • github.com/username (References to your GitHub page in READMEs or in website copy)
  • username.github.io (Links to your GitHub Page)
  • git@github.com:username (Git config remote ssh URLs)
  • travis-ci.com/username (Travis badges in READMEs)
  • shields.io/github/.../username (Shields badges in READMEs, types include contributors, stars, tags, and more)

You can quickly identify where the above strings are located using this command for each string:

grep -rnw -e 'foobar'

This will recursively (r) search all files for strings matching the whole (w) pattern (e) provided and prefix results with the line numbers (n) so you can easily find them.

Using find and sed can make these changes much faster. See this article on search and replace.

Enjoy your new handle! (I hope it sticks.)



Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started

A quick guide to changing your GitHub username

Some additional steps to consider after making a change to your username on GitHub.

This being the 2,38947234th and probably last time I’ll change my username, (marriage is permanent, right?) I thought I’d better write a quick post on how this transition can be achieved as smoothly as possible. You can read official instructions on how to change your GitHub username here, and they will tell you how to do it and what happens. The following is a quick guide to some things to consider afterwards.

Where to make changes

  1. Change username in GitHub account settings.
  2. If using GitHub Pages, change name of your “username.github.io” repository.
  3. If using other services that point to your “username.github.io” repository address, update them.
  4. If using Netlify, you may want to sign in and reconnect your repositories. (Mine still worked, but due to a possibly unrelated issue, I’m not positive.)
  5. Sign in to Travis CI and other integrations (find them in your repository Settings tab -> Integrations & services). This will update your username there.
  6. Update your local files and repository links with very carefully executedfind and sed commands, and push back changes to GitHub.
  7. Redeploy any websites you may have with your updated GitHub link.
  8. Fix any links around the web to your profile, your repositories, or Gists you may have shared.

Local file updates

Here are some suggestions for strings to search and replace your username in.

  • github.com/username (References to your GitHub page in READMEs or in website copy)
  • username.github.io (Links to your GitHub Page)
  • git@github.com:username (Git config remote ssh URLs)
  • travis-ci.com/username (Travis badges in READMEs)
  • shields.io/github/.../username (Shields badges in READMEs, types include contributors, stars, tags, and more)

You can quickly identify where the above strings are located using this command for each string:

grep -rnw -e 'foobar'

This will recursively (r) search all files for strings matching the whole (w) pattern (e) provided and prefix results with the line numbers (n) so you can easily find them.

Using find and sed can make these changes much faster. See this article on search and replace.

Enjoy your new handle! (I hope it sticks.)



Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started

As a basic refresher for most working on multiple coding projects or git-scm hosted accounts changing from one git account to another begs the question:

How do I see or change my Git (or github) username (usually email address)?

How to show your Git username – the basics

Use one of these methods:

  1. git config -get [user.name | user.email]
  2. git config –list
  3. or, open your git config file directly

Let’s examine each of these show your git username basics:

#1 – Use the command, git config -get [user.name | user.email]

git config user.name

This returns

Christian Screen

And if you enter git config user.email from the terminal from anywhere with your git initiated directory such as

git config user.email

this will return

cscreen@aiteamsuperstars.com

#2 – Use the command, ‘git config –list’

This approach shows all of the key configurations from your git config file, so entering the command from the terminal:

git config --list

will return the following:

credential.helper=osxkeychain
user.name=Christian Screen
user.email=cscreen@aiteamsuperstars.com

core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=https://github.com/aicglabs/datalakehouse.git

#3 – Use the ‘open your git config file directly’ approach via the terminal

If the above approaches for some reason did not work then open the file for reading/editing in your terminal window or favorite editor. Terminal window review and editing is recommended to avoid issues. Use the following command to view the global git settings:

vi ~/.gitconfig

This will open the VimEditor and your .gitconfig file should look something like this:

[user]
        name = Christian Screen
        email = cscreen@aiteamsuperstars.com

Since this is your ‘global’ git user information (using the user home director path, ~/) you could have a different settings in other projects you might be working on.

NB: I find it best that if you have a specific project you are contributing to and need to use different credentials for the contribution, you should clone the project and then within the project use the command line to change your user.name and user.email just for that local git repository clone project to not impact your global settings. This would look like this from the command line (notice the –global is missing):

git config user.name "Christian Contribution Project"
git config user.email "christian@personalemail.com"

Read below if you’d like to see how to change your global Git username or email address.

How to change your Git username – the basics

Changing your Git username is fairly straightforward. In your terminal window enter the following:

git config --global user.name "Christian The Architect"

You can then view the change directly in the ~/.gitconfig file or just use the ~/.gitconfig file to edit the user.name key/value pair directly in the Vim Editor as you see here:

vi ~/.gitconfig

Since this is again your global Git config file, be sure edit it carefully. Remember in the Vi(m) Editor, use the ‘Esc’ key and then type ‘wq’ and then press the ‘Return’ or ‘Enter’ key to write/save the file and exit.

How to change your Git email address – the basics

You can change your email address with the same process and command as you would your username using these commands from the terminal:

git config --global user.email "cscreen@aiteamsuperstars.com"

View any of your global changes (those made with the –global flag) using either command below:

cat ~/.gitconfig
vi ~/.gitconfig

Hopefully you’ll have success remembering these basic Git commands.

title intro redirect_from versions topics shortTitle

Changing your GitHub username

You can change the username for your account on {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.location.product_location %} if your instance uses built-in authentication{% endif %}.

/articles/how-to-change-your-username

/articles/changing-your-github-user-name

/articles/renaming-a-user

/articles/what-happens-when-i-change-my-username

/articles/changing-your-github-username

/github/setting-up-and-managing-your-github-user-account/changing-your-github-username

/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username

/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username

fpt ghes ghec

*

*

*

Accounts

Change your username

{% ifversion ghec or ghes %}

{% note %}

{% ifversion ghec %}

Note: Members of an {% data variables.enterprise.prodname_emu_enterprise %} cannot change usernames. Your enterprise’s IdP administrator controls your username for {% data variables.product.product_name %}. For more information, see «About {% data variables.product.prodname_emus %}.»

{% elsif ghes %}

Note: If you sign into {% data variables.location.product_location %} with LDAP credentials or single sign-on (SSO), only your local administrator can change your username. For more information about authentication methods for {% data variables.product.product_name %}, see «Authenticating users for {% data variables.location.product_location %}.»

{% endif %}

{% endnote %}

{% endif %}

About username changes

You can change your username to another username that is not currently in use.{% ifversion fpt or ghec %} If the username you want is not available, consider other names or unique variations. Using a number, hyphen, or an alternative spelling might help you find a similar username that’s still available.

If you hold a trademark for the username, you can find more information about making a trademark complaint on our Trademark Policy page.

If you do not hold a trademark for the name, you can choose another username or keep your current username. {% data variables.contact.github_support %} cannot release the unavailable username for you. For more information, see «Changing your username.»{% endif %}

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.

{% data variables.product.product_name %} cannot set up redirects for:

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

{% ifversion fpt or ghec %}

If you’re a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you cannot make changes to your username. {% data reusables.enterprise-accounts.emu-more-info-account %}

{% endif %}

{% ifversion fpt or ghec %}

{% data reusables.accounts.rename-account-repo-namespace-retirement %} If you try to create a repository using a retired owner name and repository name combination, you will see the error: «The repository <REPOSITORY_NAME> has been retired and cannot be reused.»

{% endif %}

{% data reusables.package_registry.rename-account-namespace-retirement %}

Repository references

After you change your username, {% data variables.product.product_name %} 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 «Managing remote repositories.»

Links to your previous profile page

After changing your username, links to your previous profile page, such as https://{% data variables.command_line.backticks %}/previoususername, will return a 404 error. We recommend updating any links to your account on {% data variables.location.product_location %} from elsewhere{% ifversion fpt or ghec %}, such as your LinkedIn or Twitter profile{% endif %}.

Your Git commits

{% ifversion fpt or ghec %}Git commits that were associated with your {% data variables.product.product_name %}-provided noreply email address won’t be attributed to your new username and won’t appear in your contributions graph.{% endif %} If your Git commits are associated with another email address you’ve added to your GitHub account, {% ifversion fpt or ghec %}including the ID-based {% data variables.product.product_name %}-provided noreply email address, {% endif %}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 «Setting your commit email address.»

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.

{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.account_settings %}
3. In the «Change username» section, click Change username.
Change Username button{% ifversion fpt or ghec %}
4. Read the warnings about changing your username. If you still want to change your username, click I understand, let’s change my username.
Change Username warning button
5. Type a new username.
New username field
6. If the username you’ve chosen is available, click Change my username. If the username you’ve chosen is unavailable, you can try a different username or one of the suggestions you see.
Change Username warning button
{% endif %}

Further reading

  • «Why are my commits linked to the wrong user?»{% ifversion fpt or ghec %}
  • «{% data variables.product.prodname_dotcom %} Username Policy»{% endif %}

Понравилась статья? Поделить с друзьями:
  • Как изменить username git
  • Как изменить user ltx
  • Как изменить user agent edge
  • Как изменить user agent chrome
  • Как изменить url через js