Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote_sha.github_remote does not honour remote credentials #1827

Closed
renozao opened this issue Jul 23, 2018 · 1 comment
Closed

remote_sha.github_remote does not honour remote credentials #1827

renozao opened this issue Jul 23, 2018 · 1 comment

Comments

@renozao
Copy link
Contributor

renozao commented Jul 23, 2018

Calling remote_sha with a github remote pointing to a private repository returns NA.

withr::with_envvar(c(GITHUB_PAT = "xxxxx"),  {
devtools:::remote_sha(devtools:::github_remote("private/repo"))
})
@lock
Copy link

lock bot commented Jan 19, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
HughParsonage pushed a commit to HughParsonage/devtools that referenced this issue Jul 2, 2019
We need to pass credentials to `git2r::remote_ls()` in order for it to
return the SHA from private repositories. We can authenticate via basic
authentication with the oauth token as our password
https://developer.github.com/v3/auth/#via-oauth-tokens. In this case the
username does not really matter, but we look it up if needed anyway.

Fixes r-lib#1827
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant