Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit72101bb

Browse files
committed
Remove conditionals
1 parent32fd1ea commit72101bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎vignettes/intro.Rmd‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The `credentials` package contains tools for configuring and retrieving SSH and
1212
##Two types of remotes
1313

1414
```{r, echo=FALSE}
15-
has_git <- credentials:::has_git_cmd() && .Platform$OS.type != 'windows'
1615
delete_git_config_on_exit <- !file.exists('~/.gitconfig')
1716
credentials:::set_default_cred_helper()
1817
@@ -65,7 +64,7 @@ To save you from entering your password over and over, git includes a [credentia
6564

6665
To see which helper is configured for a given repo, run:
6766

68-
```{r, eval=has_git}
67+
```{r}
6968
credential_helper_get()
7069
```
7170

@@ -75,15 +74,15 @@ Most `git` installations default to `store` if supported because it is more conv
7574

7675
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.
7776

78-
```{r, echo=FALSE, eval=has_git}
77+
```{r, echo=FALSE}
7978
# This hack may not work on MacOS server where cred helper is osxkeychain
8079
# which always requires user interaction. Hence error=TRUE in the next block.
8180
example <- list(protocol = "https", host = "example.com",
8281
username = "jeroen", password = "supersecret")
8382
credential_approve(example)
8483
```
8584

86-
```{r error=TRUE, eval=has_git}
85+
```{r error=TRUE}
8786
library(credentials)
8887
git_credential_ask('https://example.com')
8988
```
@@ -99,7 +98,7 @@ In a terminal window this will result in an interactive password prompt. In Wind
9998

10099
<imgstyle="width:690px;padding:0;"src="wincred.png">
101100

102-
```{r, echo=FALSE, eval=has_git}
101+
```{r, echo=FALSE}
103102
credential_reject(list(protocol = "https", host = "example.com"))
104103
```
105104

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp