The first PR is the URL gh prints
Login is not a pull request. The first PR is the URL gh prints.
Finishing login is not a pull request. gh auth login only authenticates; on success the terminal prints a URL. To line up that command list, open a room on oakmeet.
The searchable mistake is treating gh auth login as the first PR. The manual: gh pr create prints the URL of the created pull request. The alias is gh pr new.
Login stores a token. create prints a URL
login stores credentials
The default authentication mode is a web-based browser flow. After completion, the token is stored in the system credential store. If that store is missing, gh writes a plain text file. gh auth status shows the location.
create opens the PR
The first sentence of the manual: create a pull request on GitHub. Upon success, the URL is printed. If the branch is not fully pushed, gh asks where to push and may offer a fork. --head skips forking and pushing.
| Command | What it does | Is there a PR |
|---|---|---|
gh auth login | Authenticate with a host | No |
gh auth status | Test known accounts | No |
gh pr create | Create and print the URL | Yes |
gh pr create --web | Open the browser create page | Not yet |
Four steps to a URL in the terminal
- 01gh auth login
Interactive setup is enough. Default host
github.com; override with--hostname. To open a browser:gh auth login --web --clipboard. A classic PAT on stdin:gh auth login --with-token < mytoken.txt. Minimum scopes:repo,read:org,gist. - 02gh auth status
Check the active account. Auth issues exit with 1. For headless use, gh reads a token from environment variables; see
gh help environment. In GitHub Actions, setGH_TOKEN: ${{ github.token }}underenv. - 03On a branch you can push
If the current branch is not fully pushed,
gh pr createasks where to push. Without permission it may fork, with only the upstream default branch. Title and body are prompted; skip with--titleand--body.--filluses commit info; explicit flags overwrite autofill. - 04gh pr create, wait for the URL
Documented example:
gh pr create --title "The bug is fixed" --body "Everything works again". Success prints a URL. Base branch:--base, elsegh-merge-base, else the repository default branch.
gh auth login
gh auth status
gh pr create --title "The bug is fixed" --body "Everything works again"When login ends, there is no PR. When the terminal prints a URL, there is.
- Why --web is not creating from the terminal
- The documented example opens the pull request creation page in the browser. The PR exists after you submit there.
- Fixes #123 in the body
- If the body mentions
Fixes #123orCloses #123, merging the PR closes that issue. - Projects ask for a scope
- Adding a PR to projects needs the
projectscope. Rungh auth refresh -s project.
Put the three commands on one page
If two people need to agree which step counts as the PR, draw login, status, and create on one board. oakmeet is a browser whiteboard: a space code, no account. It is not GitHub CLI.
Align, then go back to the terminal. Next: start a room, or see create and join a space and uv run is the first real command.
Why is there no PR after login?
gh auth login authenticates one host and stores a token. The manual puts creation on gh pr create. Success is a printed URL.
Does gh pr create --web open the PR?
No. It opens the browser create page. To create from the terminal, omit --web and wait for the URL.
What if the branch is not pushed?
The manual: if the current branch is not fully pushed, gh asks where to push and may offer to fork. That fork only has the upstream default branch. --head skips forking and pushing.
Does oakmeet run gh for me?
No. oakmeet is a short-lived browser room and a board. The start link is only so you can lay out the commands. The PR is still created on GitHub.