Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions lessons/03-set-up-your-machine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions lessons/A-troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down Expand Up @@ -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
Expand Down
Loading