📜  bitbucket ssh 密钥不起作用 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:09.550000             🧑  作者: Mango

代码示例1
ssh -T hg@bitbucket
You use hg@bitbucket when logging in via SSH, but in the remote URL you add to Git, you don’t specify a username. Since the configuration also does not include one, Git won’t know what username to log in with.

Change the URL to this:

git remote add origin git@bitbucket:ivanna/my-repo.git
Alternatively, you can add the user to the SSH config:

Host bitbucket
    Hostname        bitbucket.org
    User            git
    IdentityFile    /home/ivanna/.ssh/id_rsa_bitbucket
    IdentitiesOnly yes