Git 如何将本地回购推送到bitbucket?

Git 如何将本地回购推送到bitbucket?,git,ssh,bitbucket,ssh-keys,atlassian-sourcetree,Git,Ssh,Bitbucket,Ssh Keys,Atlassian Sourcetree,我在bitbucket上有我的在线回购协议,我使用以下方法创建了ssh密钥: ssh-keygen 我已经将生成的密钥用作在线回购的部署密钥。 然后,在源代码树中,我添加了生成的密钥,但当我推送repo时,我得到以下错误: Pushing to git@bitbucket.org:xxxxx/xxxxxx.git Permission denied (publickey). fatal: Could not read from remote repository. Please make

我在bitbucket上有我的在线回购协议,我使用以下方法创建了ssh密钥:

ssh-keygen
我已经将生成的密钥用作在线回购的部署密钥。 然后,在源代码树中,我添加了生成的密钥,但当我推送repo时,我得到以下错误:

Pushing to git@bitbucket.org:xxxxx/xxxxxx.git

Permission denied (publickey).

fatal: Could not read from remote repository.

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




Completed with errors, see above.
那么,还缺少什么呢?

如中所述,设置“部署密钥”将只提供只读访问:推送将永远无法工作

您需要将公钥($HOME/.ssh/id_rsa)添加到您的BitBucket帐户。

请参见“”

I尽管我创建了一个特定的公钥,但只有cat~/.ssh/id_rsa.pub显示的密钥有效,为什么我不能添加任何公钥?