How do I import a specific branch of github repo?

I’m trying to import a specific branch of a certain repo but I cant
I tried git clone https::github.com/user/app.git app but seems like that is no longer supported by github

Hey @Min,

Can you try using git clone -b my-branch git@github.com:user/myproject.git

The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nTheg6kXUpJWSl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Hmmm…that sounds strange… Are you sure the repository exists?

Hey @Min did you ever resolve this? I might be missing something, but I think this is an SSH issue – you may need to generate a public key in the existing container (from the console of the project you’re trying to clone into) and then authorize that key from your git repo. I’m happy to help if this is still giving you trouble!

This is a stackoverflow response that summarizes it better than I did: https://stackoverflow.com/questions/2643502/how-to-solve-permission-denied-publickey-error-when-using-git#2643584

1 Like