jgehrcke/github-repo-stats

Improve error message when token contains leading or trailing whitespace.

Opened this issue · 2 comments

GHRS_TESTING_DATA_REPO_DIR is unset
+ git ls-remote --exit-code --heads https://ghactions: ***@github.com/CARV-ICS-FORTH/frisbee.git github-repo-stats
use 'git ls-remote' to check if data branch exists in data repo
fatal: unable to access 'https://ghactions:/': Could not resolve host: ghactions

https://github.com/CARV-ICS-FORTH/frisbee/actions/runs/2989864452/jobs/4793820289

Based on the log output ...https://ghactions: ***@github.com... I believe what happened is that the API token was pasted with a leading space character. The resulting error message Could not resolve host: ghactions probably was so misleading to the user that they gave up. We should give them the pointer that the provided API token appears to be invalid.

Thanks for your work on this! It's a wonderful tool.

Just popping by to say that I had this error as well. In my case, I solved it by removing the two lines that trailed the yml file from the tutorial on the wiki. Otherwise everything went very smoothly.

https://github.com/jgehrcke/github-repo-stats/wiki/Tutorial#step-2-add-workflow-file-to-default-branch

Oh, thank you so much for the kind feedback, Hannah!