从 GitHub 克隆特定分支 - 致命错误

Cloning a specific branch from GitHub - fatal error

我正在尝试从 GitHub 克隆 this 分支。我使用 Ubuntu 虚拟机并在终端中输入:

git clone --single-branch --branch python3 git@github.com:HaseloffLab/CellModeller.git

输出:

Cloning into 'CellModeller'...
The authenticity of host 'github.com (140.82.118.3)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,140.82.118.3' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我也试过 git clone -b <branch> <remote_repo> 但权限被拒绝。

来自 GitHub 帮助 page,

Cloning with SSH URLs

SSH URLs provide access to a Git repository via SSH, a secure protocol. To use these URLs, you must generate an SSH keypair on your computer and add the public key to your GitHub account. For more information, see "Connecting to GitHub with SSH"

When you git clone, git fetch, git pull, or git push to a remote repository using SSH URLs, you'll be prompted for a password and must provide your SSH key passphrase. For more information, see "Working with SSH key passphrases."

您也可以使用 HTTPS URL 进行克隆。

你的情况是:

git clone -b python3 https://github.com/HaseloffLab/CellModeller.git

详细了解使用 HTTPS 克隆 URL here