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
Copy file name to clipboardExpand all lines: vignettes/articles/git-credentials.Rmd
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ Copy the PAT to the clipboard, anticipating what we'll do next: trigger a prompt
149
149
150
150
Sidebar about storing your PAT: If you use a password management app, such as 1Password or LastPass (highly recommended!), you might want to add this PAT (and its *Note*) to the entry for GitHub.
151
151
Storing your PAT in the Git credential store is a semi-persistent convenience, sort of like a browser cache or "remember me" on a website, but it's quite possible you will need to re-enter your PAT in the future.
152
-
You could decide to embrace the impermanance of your PAT and, if it is somehow removed from the store, you'll just re-generate a new PAT and re-enter it.
152
+
You could decide to embrace the impermanence of your PAT and, if it is somehow removed from the store, you'll just re-generate a new PAT and re-enter it.
153
153
If you accept the default 30-day expiration period, this is a workflow you'll be using often anyway.
154
154
But if you create long-lasting tokens or want to play around with the functions for setting or clearing your Git credentials, it can be handy to have your own record of your PAT in a secure place, like 1Password or LastPass.
155
155
@@ -289,7 +289,7 @@ Once they retrieve a PAT from the store, they temporarily cache it in an environ
289
289
This allows a discovered PAT to be reused, potentially by multiple packages, repeatedly over the course of an R session.
290
290
291
291
Using `.Renviron` as your primary PAT store is less secure and, if you can, it is safer to keep your PAT in the Git credential store and let packages that need it to discover it there upon first need.
292
-
Linux users may still need to use the `.Renviron` method, since they don't have easy access to OS-managed stores like macOS's Keychain or Windows Credential Manager.
292
+
Linux users may still need to use the `.Renviron` method, since they don't have easy access to OS-managed stores like the macOS Keychain or Windows Credential Manager.
293
293
294
294
If you still need to use `.Renviron` method, `usethis::edit_r_environ()` opens that file for editing.
295
295
@@ -340,7 +340,7 @@ Do NOT define `GITHUB_PAT` in `.Renviron`.
340
340
If you want to keep using remotes, instead of pak, you could just rely on the built-in credential.
341
341
This will suffice if rate-limiting is the only concern, but obviously will not provide access to private repositories.
342
342
343
-
If you really want to use remotes, with your own PAT, you can "tickle" gitcreds, via `gitcreds::gitcreds_get()`, to get it to load your PAT from the store into the `GITHUB_PAT`env var, where remotes will happily find it.
343
+
If you really want to use remotes, with your own PAT, you can "tickle" gitcreds, via `gitcreds::gitcreds_get()`, to get it to load your PAT from the store into the `GITHUB_PAT`environment variable, where remotes will happily find it.
344
344
This could be done interactively as needed, written into individual scripts, or
345
345
even executed in a startup file.
346
346
This still avoids defining `GITHUB_PAT` in `.Renviron`.
0 commit comments