nchah / github-traffic-stats

Get statistics on web traffic to your GitHub repositories.
https://pypi.org/project/github-traffic-stats/
121 stars 31 forks source link

re: Bad Credentials #18

Open sampoearas opened 5 years ago

sampoearas commented 5 years ago

@nchah I am having credential problems with the package. when I run the package as below I get the following response (i have tried manual pw entry and the concatenated version): pipenv run gts 'sampoearas' 'ALL' 'save_csv' Password: [Correct Password] Bad Credentials Code done.

I also have tried running it with my organization and get the same error pipenv run gts 'sampoearas' 'ALL' 'save_csv' -o 'araslabs'

After some investigating, I can get the API to pass back a 200 just using my credentials on a /user page, and I can get a direct call to my organization: https://api.github.com/users/araslabs/repos?per_page=100

Any ideas what I'm doing wrong? I can generate a public key if that will help with the debugging.

Thanks for the help, @sampoearas

nchah commented 5 years ago

@sampoearas Apologies for the late reply.

Could you try cloning this repo in a new directory and running python3 gts/main.py 'sampoearas' 'some_repo' 'save' ?

The only obscure bug that comes to mind is some pw handling with .strip() at https://github.com/nchah/github-traffic-stats/blob/master/gts/main.py#L370 (Refactoring some of this code is on my TODO list for someday :) )