Skip to content

Authenticate using Github Personal Access Token - #24

Closed
hanxue wants to merge 1 commit into
IQAndreas:masterfrom
hanxue:token
Closed

hanxue wants to merge 1 commit into
IQAndreas:masterfrom
hanxue:token

Conversation

@hanxue

@hanxue hanxue commented Dec 2, 2013

Copy link
Copy Markdown
Contributor

As a more secure alternative to password. Add 'token' setting, or read from env variable GITHUB_CLI_TOKEN

…rnative to password. Add 'token' setting, or read from env variable GITHUB_CLI_TOKEN
@asmeurer

Copy link
Copy Markdown
Contributor

You still have to type your password with this. Is that intended?

@asmeurer

Copy link
Copy Markdown
Contributor

This doesn't seem to work with config.ini. I setup it up with

[login]
    username = asmeurer@gmail.com
    token = <my token>

It does work with the GITHUB_CLI_TOKEN variable.

@JensTimmerman

Copy link
Copy Markdown

It looks like it still needs the password to be defined in the config file, but will not use it if token is set, so this should work:

[login]
    username = <user_name>
    password = whatever
    token = <my token>

@asmeurer

Copy link
Copy Markdown
Contributor

That doesn't seem to work for me. I get

Using Github CLI token
Using Github CLI token
ERROR: There was a problem during authentication.
Double check that your Github Token or username and password are correct, and that you have permission to read from or write to the specified repositories.

It only works if I set the environment variable in the command line.

@valentinzberea

Copy link
Copy Markdown

This pull request should be closed. The need is addressed by this comment: #21 (comment)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants