posener / goreadme

Generate readme file from Go doc. Now available as a Github action!
MIT License
213 stars 31 forks source link

401: Bad credentials #103

Closed pashagolub closed 3 years ago

pashagolub commented 3 years ago

Good day. Trying goreadme get all kind of errors:

> goreadme github.com/posener/goreadme
2021/04/28 11:59:26 Getting github.com/posener/goreadme
Failed: failed getting github.com/posener/goreadme: 401: Bad credentials (https://api.github.com/repos/posener/goreadme)
PS ..\pg_timetable > goreadme -recursive internal\pgengine
2021/04/28 12:00:40 Getting internal\pgengine
Failed: failed getting internal\pgengine: Import path not valid:
PS ..\pg_timetable > goreadme -recursive internal/pgengine
2021/04/28 12:00:44 Getting internal/pgengine
Failed: failed getting internal/pgengine: Import path not valid:
PS ..\pg_timetable > goreadme -recursive .
2021/04/28 12:01:42 Getting .
Failed: failed getting .: Import path not valid:

Neither manual nor error messages contain useful information for me. I would like to ask you if I'm doing something incredibly wrong before investigating source code.

Thanks in advance!

posener commented 3 years ago

Hi there,

Regarding the "Bad credentials" issue - this project is using https://github.com/golang/gddo to get documentation. Do you by any chance have an invalid GITHUB_TOKEN or GITHUB_CLIENT_ID defined in your system - it might cause this issue I suspect.

Regarding other errors - From the forward slashes it looks like you are using Windows, and I never tested this on Windows. Would be happy for contribution if you want.

pashagolub commented 3 years ago

Hi,

checked ENVs. No sign of GITHUB_TOKEN or GITHUB_CLIENT_ID.

Yeap, I was trying on Windows. How can I help you with that?

posener commented 3 years ago

You were right, sorry for the confusion. It seems that there is an issue, I also get the same error. At least, if you clone a repo and go to the root directory, running just goreadme or goreadme -recursive, without import path or "." should work.