個人用の SSH ユーザー キー

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

You can use SSH keys to establish a secure connection between your computer and Bitbucket Data Center and Server for when you are performing Git operations (pull, clone, push) from your local machine. Personal keys are attached to your Bitbucket account – they are bound by that account's permissions and use the account's identity for any operations.

Before you can use SSH keys to secure a connection with Bitbucket the following must have already been done:

  • your Bitbucket administrator must have already enabled SSH access in Bitbucket.
  • SSH キーが必要です。「SSH キーの作成」を参照してください。既存のキーがリポジトリやプロジェクト アクセス キーとして使用されていない場合、それを使用することもできます。
  • you need to have added your personal SSH key to your Bitbucket account – see the following section.

Once you have an SSH key associated with your Bitbucket account, using it is easy! See Use SSH keys to connect to Bitbucket repositories below.

Bitbucket supports the following SSH key types:
  • ED25519
  • RSA2 (we recommend you use a key size of at least 2048 bits)
  • ECDSA
  • DSA (we recommend you use other key types)

注意:

  • A Bitbucket user can add any number of keys to their account.
  • 同じ SSH アクセス キーを複数のリポジトリまたはプロジェクトで使用できます。
  • 個人ユーザー アカウントに使用されているキーを、プロジェクトまたはリポジトリのアクセス キーとして再利用することはできません。また、プロジェクトまたはリポジトリ キーとして使用されているキーをユーザー アカウントに再利用することはできません。
  • If you've already cloned a repository, you'll need to make sure you’re accessing it via the SSH URL. Learn more about how Git remote works

Add an SSH key to your Bitbucket account

  1. Windows 場合、コマンド プロンプトで、ディレクトリを .ssh ディレクトリに変更し、以下を実行して公開キー ファイルをクリップボードにコピーします。

    Windows
    cd %userprofile%/.ssh
    clip < id_ed25519.pub


    macOS または Linux の場合、ターミナルで次のコマンドを実行します。

    Mac OS X
    pbcopy < ~/.ssh/id_ed25519.pub

    If pbcopy isn't working, locate the hidden .ssh folder, open the file in a text editor, and copy it to your clipboard.
    Note that on Linux, you may need to download and install xclip, then use that, as shown in this code snippet:

    Linux
    sudo apt-get install xclip
    xclip -sel clip < ~/.ssh/id_ed25519.pub
  2. In Bitbucket, go to your account:

     

    1. Select Manage account.
  3. [SSH キー] > [キーの追加] の順にクリックします。 
  4. キーをテキスト ボックスに貼り付けます。 

  5. [キーの追加] をクリックします。これで完了です。

Use SSH keys to connect to Bitbucket repositories

SSH アクセスが上記のようにセットアップされている必要があります。これが完了すると、次のように SSH キーを使用できます。

  1. [プロジェクト] に移動してプロジェクトをクリックし、一覧からリポジトリを選択します。
  2. サイドバーの [クローン] をクリックして、リポジトリのクローン URL を確認します。
  3. Choose the clone URL you want to use. SSH is available if you have already added an SSH key to your account. If you haven't done that yet, see Add an SSH key to your Bitbucket account, above.
最終更新日 2022 年 11 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.