We host our internal packages on Azure DevOps and I'd like to link these packages to RStudio Package Manager (RSPM) using a Personal Access Token (PAT). If I were to clone a repo manually, I'd do the following. First, I'd assign my PAT to a variable and then encode it as base 64.
PAT=<Personal Access Token goes here>
B64_PAT=$(printf ":$PAT" | base64)
Next, I would use git clone, but passing my encoded as an extra header, like so.
git -c http.extraheader="AUTHORIZATION: Basic ${B64_PAT}" clone https://xxxxx@dev.azure.com/xxxxx/xxxxxx/_git/xxxxxxx
This works just great.
To use a git repo with RSPM, though, I must use git-builder
to build my package. My question is, how do I include the http.extraheader
in my git-builder
command? I have consulted the documentation, as well as the RSPM CLI help files, but it's not clear to me if this is possible or not. Any suggestions would be appreciated!