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
@@ -65,7 +64,7 @@ To save you from entering your password over and over, git includes a [credentia
65
64
66
65
To see which helper is configured for a given repo, run:
67
66
68
-
```{r, eval=has_git}
67
+
```{r}
69
68
credential_helper_get()
70
69
```
71
70
@@ -75,15 +74,15 @@ Most `git` installations default to `store` if supported because it is more conv
75
74
76
75
The`credentials` R package provides a wrapper around the`git credential` command line API for reading and saving credentials. The`git_credential_ask()` function looks up suitable credentials for a given URL from the store. If no credentials are available, it will attempt to prompt the user for credentials and return those instead.
77
76
78
-
```{r, echo=FALSE, eval=has_git}
77
+
```{r, echo=FALSE}
79
78
# This hack may not work on MacOS server where cred helper is osxkeychain
80
79
# which always requires user interaction. Hence error=TRUE in the next block.
81
80
example <- list(protocol = "https", host = "example.com",
82
81
username = "jeroen", password = "supersecret")
83
82
credential_approve(example)
84
83
```
85
84
86
-
```{r error=TRUE, eval=has_git}
85
+
```{r error=TRUE}
87
86
library(credentials)
88
87
git_credential_ask('https://example.com')
89
88
```
@@ -99,7 +98,7 @@ In a terminal window this will result in an interactive password prompt. In Wind