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

Improve error message when token contains leading or trailing whitespace. #66

Open
jgehrcke opened this issue Oct 11, 2022 · 2 comments

Comments

@jgehrcke
Copy link
Owner

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.

@hhollandmoritz
Copy link

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

@jgehrcke
Copy link
Owner Author

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

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

2 participants