Git clone fails when cloning via SSH

プラットフォームについて: Cloud と Data Center - この記事は クラウド プラットフォームとデータセンター プラットフォームの両方に等しく当てはまります。

Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

要約

Git clones fail when using SSH even if an Access key has been added to the repository or an SSH key has been added to the user's profile.

$ git clone ssh://git@<bitbucket URL>:<bitbucket port>/<project key>/<repository slug>.git Cloning into '<repository slug>'... Repository not found The requested repository does not exist, or you do not have permission to access it. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

環境

Bitbucket Data Center

診断

診断ステップ

  • Ensure an SSH key has been added to the user or the repository

  • Check the existing keys on the client by running

    ssh-add -l
  • Attempt to clone a change to the repository with the Git client debug on:

    # Example on Linux GIT_SSH_COMMAND="ssh -vvv" git clone ssh://git@<bitbucket URL>:<bitbucket port>/<project key>/<repository slug>.git

    The log will show which key has been used for the authentication and which ones have been tried. The line to check will look like the following:

    debug1: Offering RSA public key: /Users/<username>/.ssh/id_rsa

原因

If it has been confirmed that the correct key is being used, the problem may stem from an unidentified issue with the existing keys.

ソリューション

更新日時: September 26, 2025

さらにヘルプが必要ですか?

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