title: R packages in private organization - how to install private dependencies within organization?
body: <p>Our GitHub organization is private and is developing multiple private R packages within multiple different repositories in our organization. Some of these packages have dependencies on other repositories in our private organization. How can I set up GitHub actions to be able to install these private dependencies? My description file currently contains:</p>
  <pre><code>Imports:
      MyPackageDep
  Remotes:
      MyOrg/MyPackageDep
  </code></pre>
  <p>The relevant portion of my GitHub Actions <code>.yaml</code> is:</p>
  <pre><code>  - name: Install dependencies
      run: |
        remotes::install_deps(dependencies = TRUE)
        remotes::install_cran(&quot;rcmdcheck&quot;)
      shell: Rscript {0}
  </code></pre>
  <p>I tried following the advice of <a href="https://stackoverflow.com/questions/39618746/r-package-with-private-github-dependency">this SO post</a> by storing my PAT in an <code>.Renviron</code> file. But not only does this still not work, I still am not sure how this would work with multiple contributors to the package. Would they all just need to set up their own local <code>GITHUB_PAT</code> in their own <code>.Renviron</code>?</p>
  <p>I also tried following the advice of this <a href="https://github.com/r-lib/actions/issues/208" rel="noreferrer">GitHub issue</a> by including the following in my GitHub workflow:</p>
  <pre><code> env:
        GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
  </code></pre>
  <p>The workflow still failed to download the dependency.</p>
  <p>Is there anyway with GitHub Secrets to pre-configure the repository to have access to all other private repositories in an organization?</p>