Repository access denied. access via a deployment key is read-only

前端 未结 18 2022
孤城傲影
孤城傲影 2020-11-29 15:49

After successfully cloning my repo from heroku and added another remote

1/ git clone git@heroku.com:[APP].git
2/ git remote add bitbucket ssh://git@bitbucket         


        
18条回答
  •  失恋的感觉
    2020-11-29 16:20

    TLDR: ssh-add ~/.ssh/yourkey

    I've just worked through this problem.

    And none of the other answers helped.

    I did have a ./ssh/config with all the right stuff, also an earlier repository working fine (same bitbucket account, same key). Then I generated a deploy_key, and after that created a new repository.

    After that could not clone the new repo.

    I wish I knew how/why ssh agent was messing this up, but adding the key solved it. I mean adding the key in my local Ubuntu, not in bitbucket admin. The command is just

        ~/.ssh$ ssh-add myregualrkey
    

    Hope this helps someone.

提交回复
热议问题