Search code examples
gitpublic-keycodebase

Clone the repository from Codebase Permission denied (publickey). fatal: Could not read from remote repository


Hi i have this codebase account and i want to clone it to in my certain folder. I already added the SSH public keys in my profile in codebase. When i tried to git clone then certain path of the project this is what it goes

Cloning into 'website'... Permission denied (publickey). fatal: Could not read from remote repository.

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

can someone help me figured this out why it says Permisssion denied(public key)?? I already added my SSH public key to my profile in my account in codebase. Any help is muchly appreciated.


Solution

  • Make sure that:

    • your ssh access does work:

      ssh -T git@codebasehq.com
      

    For that, you need %HOME%\.ssh\id_rsa(.pub) files: those are the default names used by git.

    • you are cloning using an url like:

      git clone git@codebasehq.com:account/project/repo.git