-
Notifications
You must be signed in to change notification settings - Fork 154
Description
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::[email protected]: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.