-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or requestpr welcomeOpen for external contributionOpen for external contribution
Description
If you have leading/trailing space in token in config.toml (error in copy-pasting) i.e.
[github]
token = " TOKEN_HERE"
gitout
- will be able to get repositories information including private ones
- will crash when trying to clone first private repository it tries with cryptic error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 34, message: "too many redirects or authentication replays" }', src/libcore/result.rs:1188:5
If token is incorrect in the other way then gitout crashes when trying to get repos info with
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /usr/src/rustc-1.41.0/src/libcore/macros/mod.rs:15:40
More helpful error message would be appreciated.
My api token is 40 hex characters.
I am not sure whether one could assert token format as there are probably no long-term guarantees in GitHub API.
I would assume there should be some endpoint which allows for easy checking whether provided token is correct. I checked that https://stackoverflow.com/a/58572011 seems to ignore extra spaces, haven't tried GraphQL API.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpr welcomeOpen for external contributionOpen for external contribution