Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Bad credentials" error with version 0.7.0 #41

Open
DanielKehoe opened this issue May 23, 2020 · 0 comments
Open

"Bad credentials" error with version 0.7.0 #41

DanielKehoe opened this issue May 23, 2020 · 0 comments

Comments

@DanielKehoe
Copy link

DanielKehoe commented May 23, 2020

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.

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

No branches or pull requests

1 participant