Skip to content

Commit dde11b2

Browse files
authored
Update GitHub-Guide.qmd
1 parent f083a1d commit dde11b2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

GitHub-Guide.qmd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,32 @@ To push and pull changes to GitHub from your computer, you will need to authenti
105105

106106
Please see the NMFS Open Science Resource Book on [installing Git and Authenticating to GitHub](https://nmfs-opensci.github.io/ResourceBook/content/github/authenticating.html) for details on the specifics of set-up for RStudio, VSCode, terminal, etc.
107107

108+
::: {.callout-tip title="RStudio Users"}
109+
This is a callout with a title.
110+
111+
### Step 1
112+
113+
Go to Tools > Global Options > Git/SVN. Make sure the path to the git executible is there. Not there? Open a terminal and type `where git` (Windows) or `which git` (Mac). Copy the path shown into the git executible box. Still can't find the location of your git executible and you know it is installed (because you have, say, GitHub Desktop installed)?
114+
115+
* On a Mac? It is at /usr/bin/git Just paste that in.
116+
* On a PC? Look (by opening a finder window) in the following places. Try the GitHubDesktop one first.
117+
- C:/Program Files/Git/bin/git.exe
118+
- C:/Users/your.username/AppData/Local/Programs/Git/bin/git.exe
119+
- C:/Users/your.username/AppData/Local/GitHubDesktop/app-2.8.3/resources/app/git/cmd/git.exe
120+
121+
### Step 2
122+
123+
Open up RStudio and run this from the console:
124+
```
125+
install.packages("usethis")
126+
usethis::use_git_config(user.name = "YourName", user.email = "your@mail.com")
127+
# this will open a browser to create a token
128+
usethis::create_github_token() #Accept defaults scope. Copy the token. Copy that into YourPAT in code below.
129+
credentials::set_github_pat("YourPAT")
130+
```
131+
:::
132+
133+
108134
## Background {#sec-background}
109135

110136
In 2017, GitHub use was authorized for scientific products: [CIO memo](images/CIO-Memo-Use-of-GitHub-at-NOAA.pdf) authorizing GitHub use at NOAA. Subsequently, in 2017, NOAA released official GitHub guidelines [here](images/NOAA-GitHub-Usage-Guidelines.pdf). Some individual centers and offices prepared local GitHub guidelines and SOPs to help their staff interested in using GitHub. See references (@sec-references). Since 2017, GitHub use has expanded greatly across NMFS and all the federal agencies ([link](https://nmfs-opensci.github.io/ResourceBook/content/github_in_gov.html#github-in-other-agencies)), and GitHub has become integrated into modern scientific workflow. When the 2017 memo was written, GitHub was not Fedramp authorized. GitHub Enterprise became [Fedramp authorized](https://government.github.com/fedramp-faq) in 2018 and GitHub use expanded rapidly in other agencies (e.g. NIH, Census, GSA and VA) using Enterprise. In 2023, NOAA Fisheries secured an Authorization to Use (ATU) for GitHub Enterprise Cloud for Low FISMA scientific products; [Memo](https://drive.google.com/file/d/1e0RbnRPNbMP-VM-8pCeQtGVtWgHrs7TC/view) (NOAA internal).

0 commit comments

Comments
 (0)