【问题标题】:How to push a local repo to bitbucket?如何将本地 repo 推送到 bitbucket?
【发布时间】:2015-01-05 08:58:51
【问题描述】:

我在 bitbucket 上有我的 repo,我使用以下方法创建了 ssh 密钥:

ssh-keygen

我已将生成的密钥用作在线存储库的部署密钥。 然后,在 source-tree 我添加了生成的密钥,但是当我推送 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.

那么,还缺少什么?

【问题讨论】:

    标签: git ssh bitbucket ssh-keys atlassian-sourcetree


    【解决方案1】:

    如this answer 中所述,设置“部署密钥”将只授予您只读访问权限:推送永远不会起作用。

    您需要将您的公钥 ($HOME/.ssh/id_rsa) 添加到您的 BitBucket 帐户。
    见“How to install a public key on your Bitbucket account”

    【讨论】:

    • 我虽然创建了一个特定的公钥,但只有 cat ~/.ssh/id_rsa.pub 显示的密钥有效,为什么我不能添加任何公钥?跨度>
    猜你喜欢
    • 2016-06-03
    • 1970-01-01
    • 2017-01-10
    • 1970-01-01
    • 2018-04-25
    • 2014-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多