Cannot clone git repo
I am trying to collaborate on a project hosted on heroku. I have been invited via meldium.com and I have successfully registered my email adress to the project.
I received an email from heroku saying that I could clone the repo with the following command line:
$ git clone email@example.com:test-repo.git -o heroku
But everytime I try to clone the repo I get the following error message:
Warning: Permanently added the RSA host key for IP address 'XX.XX.XX.XXX' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository.
What I don't understand is that I received an email saying that a key had been added to my account and when I type heroku key I get this:
ssh-rsa AAAAB3NzaC...lhJB2r8hnD firstname.lastname@example.org
What have I done wrong?
If you're getting a public key error message then it's typically down to a mismatch between what ssh key you are presenting and what key Heroku has.
From your command line execute ssh -v email@example.com you're looking in here for a bit that looks like
debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/foobah/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 277 debug1: Authentication succeeded (publickey).
If the name of the key doesn't correspond to the public key you've added to Heroku then you'll need to either add the corresponding key to Heroku or switch the key that ssh uses for the heroku.com domain.