cli / cli/cli

`gh auth login` hangs when `config.yml` is read-only, potentially producing an "auth schism"

Open
#8,357 7 comments 0 reactions 0 assignees View on GitHub
bug core priority-3
Dominant language
Go
Stars
46.3k
Forks
9k
Avg merge
2d 9h
Merged PRs (30d)
89

Description

### Describe the bug

When `config.yml` is read-only, `gh auth login` hangs indefinitely after having stored the token in secure storage and printing `✓ Authentication complete.` This can cause some confusion for users, as described in the linked discussion below.

### Steps to reproduce the behavior

* https://github.com/cli/cli/discussions/8347#discussioncomment-7601505

### Expected vs actual behavior

* No hangs, but a warning message printed to the console and continue with the process (e.g. by trying to write `hosts.yml`)
* Maybe a more consistent behavior of `gh`, as some parts of the CLI claim authentication is done while others ask for credentials.

### Logs

None.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.