1

I have an R packaged (p1) hosted on my company's GitLab. I am attempting to split out some of the more broadly applicable functions into a separate package (p2) so that they can be used in multiple places but only maintained in one place.

When installing p1 I will use the devtools::install_gitlab function, and specify my company's gitlab as the host. In order to include p2 I need to include its location in the Remotes section of the description file. On the face of it this is simple enough and I just need to include a line Remotes: gitlab::myrepo/p2. However, this assumes a host of gitlab.com and unsurprisingly doesn't find p2, but I can't find any documentation about how one sets a host for GitLab repositories in the Remotes section.

How do I make it so that p2 is automatically installed when p1 is?

littlefeltfangs
  • 396
  • 2
  • 17

2 Answers2

2

It was solved in the version 2.3.0 of remotes package (https://cran.r-project.org/web/packages/remotes/news/news.html), so after the post. With the example above, it should work now using:

Remotes: gitlab@hostname::myrepo/p2
Coline
  • 136
  • 6
0

Coline's solution didn't work for me when pointing Remotes to a private Gitlab repo and a specific branch. But this did:

Remotes: git::git@gitlab.com:<username>/<reponame>@<branch>
Ceres
  • 163
  • 7