At present, as far as I can tell, it doesn't appear to be possible to pass credentials through to git:: Remotes (e.g. git::git@bitbucket.org:dannavarro/lsr-package.git). As such, functions like remote_sha will fail (since the remote constructed with parse_one_remote does not contain any credentials). Equally, package2remote will not specify any credentials if the remote is of type git2r.
This might be an unusual use case, but in our company we need to pass credentials for internally hosted git repositories. I've created a fork that works for us. You can see the relevant diff here:
danhalligan@be9ab58
Effectively, I pass credentials from through various functions in deps.R with ... and also use git2r::cred_ssh_key() to specify default credentials when running package2remote for a git2r remote type.
I'm willing to believe that this implementation is not a general solution (since not all git dependencies will necessarily require the same credentials), but I'd be interested in a possible general solution if possible.
Related: #146 #266
At present, as far as I can tell, it doesn't appear to be possible to pass credentials through to
git::Remotes (e.g. git::git@bitbucket.org:dannavarro/lsr-package.git). As such, functions likeremote_shawill fail (since the remote constructed withparse_one_remotedoes not contain any credentials). Equally,package2remotewill not specify any credentials if the remote is of typegit2r.This might be an unusual use case, but in our company we need to pass credentials for internally hosted git repositories. I've created a fork that works for us. You can see the relevant diff here:
danhalligan@be9ab58
Effectively, I pass credentials from through various functions in
deps.Rwith...and also usegit2r::cred_ssh_key()to specify default credentials when runningpackage2remotefor agit2rremote type.I'm willing to believe that this implementation is not a general solution (since not all git dependencies will necessarily require the same credentials), but I'd be interested in a possible general solution if possible.
Related: #146 #266