Home>

I use Bitbucket instead of Github.

Originally, I was using a remote repository on Bitbucket that was originally managed by another person with editor privileges, but since the administrator leaves the project, I am using the remote repository on Bitbucket Transferred.

So reset ssh key? I was unable to git clone, and when I checked, the "Access key" in the Repository setting on the Bitbucket personal account page was blank, so "Set up SSH on macOS" in the following Bitbucket document Reissued ssh with reference to "/Linux".
Set up an SSH key

This completes the process up to the point of cloning, but the following error occurs during git push and I cannot push.

$$git push origin master
Enter passphrase for key'/Users/bariko/.ssh/id_rsa':
Unauthorized
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Inside .ssh/config, it looks like this.

$cd ~/.ssh
$cat config
# --- Sourcetree Generated ---
Host bariko-Bitbucket
    HostName bitbucket.org
    User bariko
    PreferredAuthentications publickey
    IdentityFile /Users/bariko/.ssh/bariko-Bitbucket
    UseKeychain yes
    AddKeysToAgent yes
    UseKeychain yes
# ----------------------------


Is it not going well? I thought so and did $ssh -T [email protected], but now it is like this.

$ssh -T [email protected]
Enter passphrase for key'/Users/bariko/.ssh/id_rsa':
authenticated via a deploy key.

What's wrong...

  • Answer # 1

    What is the deploy key? I thought, but it seems that the public key of ssh is like that, so I deleted the public key registered in Bitbuket, input it again, and after that, I can smoothly git clone.

    But every time

    ssh -T [email protected]


    I can't push git without doing... Why?