Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Jan 20, 2021

Old message:

read-only token in GH_TOKEN cannot be modified

This message was vague and some users did not understand that this refers to the value that is read from environment variables.

New message:

$ GH_TOKEN=123 ghd auth login -h github.com
The value of the GH_TOKEN environment variable is being used for authentication.
To have GitHub CLI store credentials instead, first clear the value from the environment.

The large changeset is due to restructuring of the code so that individual auth commands are more responsible about how they print errors when the config isn't writeable.

Fixes #2304, closes #2658

Old message:

    read-only token in GH_TOKEN cannot be modified

This message was vague and some users did not understand that this
refers to the value that is read from environment variables.

New message:

    $ GH_TOKEN=123 ghd auth login -h github.com
    The value of the GH_TOKEN environment variable is being used for authentication.
    To have GitHub CLI store credentials instead, first clear the value from the environment.
@vilmibm
Copy link
Contributor

vilmibm commented Jan 20, 2021

tested the flows locally and it worked great 👍

@vilmibm vilmibm merged commit 5430728 into trunk Jan 20, 2021
@vilmibm vilmibm deleted the token-from-env-err branch January 20, 2021 23:06
@pageone15
Copy link

Old message:

read-only token in GH_TOKEN cannot be modified

This message was vague and some users did not understand that this refers to the value that is read from environment variables.

New message:

$ GH_TOKEN=123 ghd auth login -h github.com
The value of the GH_TOKEN environment variable is being used for authentication.
To have GitHub CLI store credentials instead, first clear the value from the environment.

The large changeset is due to restructuring of the code so that individual auth commands are more responsible about how they print errors when the config isn't writeable.

Fixes #2304, closes #2658

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

when GITHUB_TOKEN is set, print better messaging during gh auth login

3 participants