diff --git a/lessons/03-set-up-your-machine/README.md b/lessons/03-set-up-your-machine/README.md index 912b961..5a992a5 100644 --- a/lessons/03-set-up-your-machine/README.md +++ b/lessons/03-set-up-your-machine/README.md @@ -25,7 +25,10 @@ tools every Python contributor uses: | gh | `brew install gh` ([Homebrew](https://brew.sh)) or the installer from [cli.github.com](https://cli.github.com) | `winget install --id GitHub.cli` | [cli.github.com instructions](https://github.com/cli/cli/blob/trunk/docs/install_linux.md) | | Python | Installer from [python.org/downloads](https://www.python.org/downloads/) | Installer from [python.org/downloads](https://www.python.org/downloads/) | `sudo apt install python3 python3-venv python3-pip` | -On Windows, tick **Add python.exe to PATH** in the Python installer. +On Windows, python.org's download button gives you the **Python install +manager**. Install it: it adds the `py` command this course uses, and the +first time you run `py` it downloads the newest Python. If you choose the +standalone installer instead, tick **Add python.exe to PATH** in it. Close and reopen your terminal after installing, so it finds the new tools. @@ -78,7 +81,13 @@ gh auth login 4. **How would you like to authenticate?** Login with a web browser gh shows a one-time code and opens your browser. Paste the code, approve, and -come back. Check it worked: +come back. + +> **Windows:** if you get an error that mentions MinTTY instead of the +> questions, Git Bash can't show gh's menus on your install. Run +> `winpty gh auth login` instead. The questions are the same. + +Check it worked: ```bash norun gh auth status diff --git a/lessons/A-troubleshooting/README.md b/lessons/A-troubleshooting/README.md index d5dae1d..0c7d674 100644 --- a/lessons/A-troubleshooting/README.md +++ b/lessons/A-troubleshooting/README.md @@ -10,6 +10,7 @@ read the fix. | If you see... | Go to | |---|---| | `Support for password authentication was removed` / `Authentication failed` | [1. Login problems](#1-login-problems) | +| `You appear to be running in MinTTY without pseudo terminal support` (Windows) | [1. Login problems](#1-login-problems) | | `Permission to OWNER/REPO.git denied` / `returned error: 403` | [2. Pushing to the wrong repo](#2-pushing-to-the-original-repo-instead-of-your-fork) | | `Your local changes ... would be overwritten by checkout` | [3. Can't switch branches](#3-cant-switch-branches) | | You committed on `main` by mistake | [4. Committed to main](#4-committed-to-main-by-mistake) | @@ -58,6 +59,20 @@ gh auth setup-git gh auth status ``` +**On Windows, `gh auth login` stops with this instead of asking questions:** + +```text +You appear to be running in MinTTY without pseudo terminal support. +To learn about workarounds for this error, run: gh help mintty +``` + +Git Bash, as Git for Windows installs it by default, can't show gh's menus. +Put `winpty` in front, for this command only: + +```bash norun +winpty gh auth login +``` + ## 2. Pushing to the original repo instead of your fork ```text