401 Bad Credentials when good credentials provided
glenjarvis opened this issue · comments
Glen Jarvis commented
This no longer appears to function. When given valid credentials, the status is no longer updated and a 401 is returned:
Status (error, failure, pending, success): pending
Description: Build pending
Traceback (most recent call last):
File "/Users/glenjarvis/.pyenv/versions/3.8.1/bin/github_commit_status", line 8, in <module>
sys.exit(cli())
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github_commit_status/cli.py", line 144, in prompt
update_github(repo, github_token, commit, status, description)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github_commit_status/cli.py", line 70, in update_github
repo = github_client.get_user().get_repo(repo_name)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github/AuthenticatedUser.py", line 1018, in get_repo
"GET", "/repos/" + self.login + "/" + name
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github/AuthenticatedUser.py", line 235, in login
self._completeIfNotSet(self._login)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github/GithubObject.py", line 305, in _completeIfNotSet
self._completeIfNeeded()
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github/GithubObject.py", line 309, in _completeIfNeeded
self.__complete()
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github/GithubObject.py", line 316, in __complete
headers, data = self._requester.requestJsonAndCheck("GET", self._url.value)
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github/Requester.py", line 320, in requestJsonAndCheck
return self.__check(
File "/Users/glenjarvis/.pyenv/versions/3.8.1/lib/python3.8/site-packages/github/Requester.py", line 345, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.BadCredentialsException: 401 {"message": "Bad credentials", "documentation_url": "https://developer.github.com/v3"}
Glen Jarvis commented
Actually, I tried this again and was able to successfully use the API with no changes. I am unable to reproduce.