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_package_name.git2r_remote uses (some) credentials #633

Merged
merged 4 commits into from Sep 24, 2021

Conversation

rnorberg
Copy link
Contributor

@rnorberg rnorberg commented Jul 9, 2021

Related to #632 and #625. Now, when trying to download a package's DESCRIPTION file from a repo that requires authentication, some types of credentials (git2r::cred_user_pass, git2r::cred_env, and git2r::cred_token) are passed to the (internal) download function.

Related to r-lib#632 and r-lib#625. Now, when trying to download a package's `DESCRIPTION` file from a repo that requires authentication, some types of credentials (`git2r::cred_user_pass`, `git2r::cred_env`, and `git2r::cred_token`) are passed to the (internal) `download` function.
@rnorberg
Copy link
Contributor Author

rnorberg commented Jul 9, 2021

Related to #632 and #625.

@statnmap
Copy link
Contributor

@rnorberg thank you for this correction that saves me. There is a missing parenthesis, but I can validate that this works correctly after that.
You can test it with this reprex. The package {hello.seb} in private on gitlab.com. The credentials were created only for the purpose of this package, so that you can use it too.

if (!requireNamespace("git2r")) {install.packages("git2r")}
# Specific credentials for this private project
options(remotes.git_credentials = 
          git2r::cred_user_pass(username = "gitlab+deploy-token-521061", 
                                password = "Nbebu3FGGtZ6VMbLx23K"))
repo_url <- 'https://gitlab.com/statnmap/hello.seb'

# Does not work with remotes 1.4, but OK with 1.3
remotes::install_git(url = repo_url, git = "git2r")

rnorberg and others added 3 commits July 26, 2021 20:36
Co-authored-by: Sébastien Rochette <statnmap@users.noreply.github.com>
[ci skip]
@jimhester
Copy link
Member

Hey! Thanks!

@jimhester jimhester merged commit 36a88a1 into r-lib:master Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants