Rename your team

You can update your team name in Bitbucket, in your repository URLs, or in both places. If you update your name for the URL, you must update the URL in your configuration files as well, or you won't be able to push to the repository.

このページの内容

Rename your team in Bitbucket

When you rename your team, you'll see that update throughout Bitbucket.

  1. From your avatar in the bottom left, select your team or click View all teams for a full list.
  2. Click Settings in the left sidebar.
  3. From the Team settings page, update your name in the Team Name text box.
  4. Click Update to save.

Update your team ID for repository URLs

Updating your URL is a two-part processYou update the Team ID in Bitbucket and then in your configuration file.

Step 1. Update the Team ID in Bitbucket

  1. From the Team settings page, click change next to the Team ID.
  2. Enter your new Team ID. It might be a good idea to match your team name if you've updated that as well.
  3. Click Rename.

Changing the team name changes every Bitbucket URL that references the team's repositories. This change on the remote Bitbucket server invalidates any local repositories pointing to your repositories on Bitbucket. You and anyone who references the old URL in DVCS configuration files must update them to reflect the new account name. For example, if you rename your account from johnc to jcitizen, the repository previously available at http://bitbucket.org/johnc/repo is accessed as http://bitbucket.org/jcitizen/repo after renaming.

Step 2. Update the URL in your configuration file

The URL you use for a repo depends on which protocol you are using, HTTPS or SSH. You can find these URLs on the  Overview page of your repository.

You can click back and forth between the SSH and the HTTPS protocol links to see how the URLs differ. The table below shows how the formats vary based on protocol.


 
HTTPS URL 形式

SSH URL 形式

Mercurial https://<accountname>@bitbucket.org/<repo_owner>/<reponame> ssh://hg@bitbucket.org /<repo_owner>/<reponame>/
Git https://<repo_owner>@bitbucket.org/<accountname>/<reponame>.git

git@bitbucket.org:<repo_owner>/<reponame>.git

もしくは

ssh://git@bitbucket.org/<repo_owner>/<reponame>.git

Update the URL for Git repositories

  1. From a terminal, navigate to the repository.

    $ cd ~/<path_to_repo>
  2. Run git remote -v to see the current remote URL.

  3. Update the remote URL with git remote set-url using the current and new remote URLs.

If you update your URL from HTTPS to SSH, next time you push or pull from your repository, the terminal responds that it is adding the Bitbucket host to the list of known hosts. You also won't have to enter a password.

Update the URL for Mercurial repositories

  1. From your terminal, view your current repo configuration.
    You should see something similar to the following:

    $ cd ~/<path_to_repo>
    $ cat .hg/hgrc
    [paths]
    default = https://emmap1@bitbucket.org/emmap1/bitbucketspacestation

    In the previous example, the default URL is using the HTTPS protocol.

  2. Open the ~/<path_to_repo>/.hg/hgrc file with your favorite editor.
  3. Change the default value to the URL you want to use for that repository. When you are done you should see something similar to the following:

    [paths]
    default = ssh://hg@bitbucket.org/emmap1/bitbucketspacestation
  4. Save and close the configuration file.

If you update your URL from HTTPS to SSH, next time you push or pull from your repository, the terminal responds that it is adding the Bitbucket host to the list of known hosts. You also won't have to enter a password.

Last modified on Jun 14, 2017

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

Not finding the help you need?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.