cargo-binstall/crates/binstalk-downloader/src
Jiahao XU 8a08cdda6f
Fix GitHub token auto discovery ()
* Fix GitHub token auto discovery

Fixed 

 - Rm dep `gh-token` since it is broken and we can simply run
   `gh auth token` in `cargo-binstall` instead.
 - binstalk-downloader: Make sure GitHub token is at least 40B long
   and other than the `_`, composes of only alphanumeric characters.
 - Warn on failure to read `git/credential` files
 - Optimize `try_from_home` to avoid heap allocation of `PathBuf`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix typo and clippy

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Simplify `is_valid_gh_token` & `is_ascii_alphanumeric` impl

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve err msg in `get_inner`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve err msg of `cargo_binstall::gh_token::get`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-01 01:14:59 +00:00
..
download Remove dep futures-lite from binstalk-downloader () 2023-08-08 10:48:12 +00:00
gh_api_client fix binstalk_downloader::GhApiClient json deser error () 2023-07-09 10:39:18 +00:00
remote Remove dep futures-lite from binstalk-downloader () 2023-08-08 10:48:12 +00:00
download.rs Fix binstalk_downloader::Download for data-verifier () 2023-08-24 00:04:57 +00:00
gh_api_client.rs Fix GitHub token auto discovery () 2023-09-01 01:14:59 +00:00
lib.rs Refactor: Extract new crate simple-git () 2023-08-19 01:08:55 +00:00
remote.rs Refactor: Extract new crate binstalk-registry () 2023-08-13 07:16:53 +00:00
utils.rs Remove dep futures-lite from binstalk-downloader () 2023-08-08 10:48:12 +00:00