Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
@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.

3 participants