You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I'd noticed that issue. One option I'd considered was stripping out source from the remote specification (so bitbucket.org in the case of git::git@bitbucket.org:dannavarro/lsr-package.git) and providing the ability to specify credentials for specific sources flexibly as an environment variable.
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_sha
will fail (since the remote constructed withparse_one_remote
does not contain any credentials). Equally,package2remote
will 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.R
with...
and also usegit2r::cred_ssh_key()
to specify default credentials when runningpackage2remote
for agit2r
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
The text was updated successfully, but these errors were encountered: