Skip to content

"Bad credentials" error with version 0.7.0 #41

Description

@DanielKehoe

To reproduce:

$ git clone https://github.com/piotrmurach/github_cli
$ bundle install
$ bundle exec rake features
$ gem build github_cli.gemspec
$ gem install github_cli
$ gem info github_cli
$ gcli version
$ gcli auth create --scopes=repo --note=github_cli --note-url=http://github.com/piotrmurach/github_cli

Fatal error has occurred. POST https://api.github.com/authorizations: 401 - Bad credentials

I tried a work around but it didn't work. Went to https://github.com/settings/tokens and created a personal access token for github_cli with repo permissions. Copied the access token and pasted into the file .gcliconfig, with username and password:

user:
  token: 'long_string'
  login: 'DanielKehoe'
  password: 'my_password'

Tried:

$ gcli content readme DanielKehoe github_api_
Fatal error has occurred. GET https://api.github.com/repos/DanielKehoe/github_api/readme?access_token=long_string: 401 - Bad credentials
See: https://developer.github.com/v3

Uninstalling the 0.7.0 gem and using the released 0.6.2 gem works:

$ gem uninstall github_cli -v 0.7.0
$ gcli version
GitHub API v3 CLI client 0.6.2
$ gcli content readme DanielKehoe github_api
Response Status: 200

I'm not sure whether it's an issue with the 0.7.0 implementation or perhaps I've simply missed a configuration step.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions