|
| 1 | +# Setup — read before the tutorial |
| 2 | + |
| 3 | +Everything you type in this session runs on CryoCloud. This page gets you |
| 4 | +logged in and able to push to GitHub from the hub. If any step fails during the |
| 5 | +session, let us know and a facilitator will help get you unstuck. |
| 6 | + |
| 7 | +## Before you arrive |
| 8 | + |
| 9 | +1. Have a GitHub account. |
| 10 | +2. Accept the invitation to the **OceanHackWeek GitHub organization** and to the |
| 11 | + `ohw26-participants` team (check the email you used to sign up for GitHub). |
| 12 | +3. **Make your org membership Public.** CryoCloud reads your team membership to |
| 13 | + log you in, and GitHub defaults membership to *Private*. Go to |
| 14 | + `https://github.com/orgs/oceanhackweek/people/<your-handle>` and confirm you |
| 15 | + are **not** set to private. If you're private, login to the hub will fail. |
| 16 | + |
| 17 | +## Logging in to CryoCloud |
| 18 | + |
| 19 | +1. Go to `https://hub.cryointhecloud.com` and sign in with GitHub. The first |
| 20 | + time, authorize **nasa-cryo-prod** (2i2c) when asked — you should see |
| 21 | + `oceanhackweek` with a checkmark on that screen. |
| 22 | +2. On the Server Options screen: |
| 23 | + * Environment: choose the OceanHackWeek Python Image. |
| 24 | + * Resource Allocation: ~7 GB RAM is a good general choice. (This tutorial barely |
| 25 | + uses any memory, so a smaller size works too, but you'll use this same server |
| 26 | + for the data tutorials later in the week.) |
| 27 | + * Click Start. |
| 28 | +3. Wait through the startup spinner (a new node can take a few minutes to come |
| 29 | + up, especially when everyone logs in at once), and you'll land in JupyterLab. |
| 30 | +4. Open a Terminal: in the Launcher, under Other, Terminal. |
| 31 | + |
| 32 | +## One-time git setup (in the hub terminal) |
| 33 | + |
| 34 | +```bash |
| 35 | +git config --global user.name "Your Name" |
| 36 | +git config --global user.email "the-email-you-used-for-github@example.com" |
| 37 | +git config --global core.pager cat # the hub has no 'less'; this stops git log/config erroring |
| 38 | +git config --global pull.rebase false |
| 39 | +``` |
| 40 | + |
| 41 | +## Authenticating git |
| 42 | + |
| 43 | +The hub can't reuse your laptop's credentials, so you authenticate here with GitHub's CLI. Run: |
| 44 | + |
| 45 | +```bash |
| 46 | +gh auth login |
| 47 | +``` |
| 48 | + |
| 49 | +Answer the prompts with the arrow keys: |
| 50 | + |
| 51 | +1. **Where do you use GitHub?** → `GitHub.com` |
| 52 | +2. **Preferred protocol for Git operations?** → `HTTPS` |
| 53 | +3. **Authenticate Git with your GitHub credentials?** → `Yes` |
| 54 | +4. **How would you like to authenticate?** → `Login with a web browser` |
| 55 | + |
| 56 | +It shows a **one-time code** (like `XXXX-XXXX`). Copy it, then on **your own |
| 57 | +laptop's browser** open `https://github.com/login/device`, paste the code, and |
| 58 | +authorize. (Authorizing lists `oceanhackweek` — that's expected.) |
| 59 | + |
| 60 | +> **Heads up — you'll see a red message like** |
| 61 | +> `Failed opening a web browser at https://github.com/login/device ... executable |
| 62 | +> file not found`. **That is normal.** The hub simply has no browser to open for |
| 63 | +> you, which is why you open the URL on your own laptop instead. Authentication |
| 64 | +> still completes — look for `✓ Authentication complete` and |
| 65 | +> `✓ Logged in as <your-handle>`. |
| 66 | +
|
| 67 | +That's it, git can now push from the hub. (Your credentials are stored on this |
| 68 | +server, another reason to shut the server down when you're done.) |
| 69 | + |
| 70 | +## Confirm you're authenticated |
| 71 | + |
| 72 | +Check that git is ready to talk to GitHub: |
| 73 | + |
| 74 | +```bash |
| 75 | +gh auth status |
| 76 | +``` |
| 77 | + |
| 78 | +You should see something like `✓ Logged in to github.com account <your-handle>`. |
| 79 | +If you do, you're set. We'll clone the activity repo together as the first step |
| 80 | +of the tutorial. |
| 81 | + |
| 82 | +## When you're done for the day |
| 83 | + |
| 84 | +Shut your server down so it isn't billing idle compute: **File → Hub Control |
| 85 | +Panel → Stop My Server** (or go to `https://hub.cryointhecloud.com/hub/home`). |
| 86 | +Stopping the server does **not** delete anything in your home directory. |
0 commit comments