How to fork a Github repo to RStudio (on Windows 10)

I'm trying to copy a Github repo that has been shared with me. I'm struggling with the workflow.

  1. My colleague has a private Github repo which contains an RStudio project
  2. He adds me as a collaborator.
  3. I Fork the repo to my own Gtihub account
  4. I open the Clone button and copy the SSH link to my clipboard
  5. I create a new RStudio project on my computer with the same name and with a new git repository
  6. I open a Git|Shell and type something like
    git remote add origin git@github.com:mygithubaccount/xyz.git
  7. Everything seems fine when I type
    git remove -v
  8. Now I try to fetch the files, but I get an SSH error, despite the fact that I have pushed and pulled to Github recently from RStudio
$ git pull origin master
Could not create directory '/i/Simon/Modelling_Toolbox/R/xyz/=/.ssh'.
The authenticity of host 'github.com (13.237.44.5)' can't be established.
RSA key fingerprint is ....
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/i/Simon/Modelling_Toolbox/R/xyz/=/.ssh/known_hosts).
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Any help appreciated.

If you've forked the repo already, why don't you just clone it in RStudio as an existing version control project: File > New Project... > Version Control > Git? Perhaps I am missing something.

1 Like

I actually got it downloaded now using the https authentication method. But I am not able to pull/push the Github. I think the permissions aren't set up right.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.