R sourcing private repositions from github

Hi, I was wondering how to create private repositories on github that I was granted access to.

Using the devtools package, it’s easy enough to open open repositories using commands such as:

 source_url('https://raw.github.com/hadley/stringr/master/R/c.r') 

but doing the equivalent with the url for private repo does not work.

PS I know that I can clone the entire repo and then get the file this way, but I'm only looking for one specific file in the whole repo that I need to take, and it's a little inefficient to clone all this, copy the code and use it as needed .

+4
source share
1 answer

I am not very familiar with R, but I usually include private repositories in my projects using the Git protocol via SSH.

GitHub requires you to authenticate in order to download personal code. If you use Git through SSH, your computer will authenticate using the SSH key when you pull project-specific. I do this with Ruby projects that use private gems, but I'm not sure if R allows you to get dependencies using Git via SSH.

0
source

Source: https://habr.com/ru/post/1433689/


All Articles