-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix GitHub token auto discovery #1335
Conversation
Fixed #1333 - 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>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
That assumes someone has installed the Maybe it would be good to keep that logic, in case someone hasn't installed it and test for the presence of |
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@simonsan If I don't see why |
PS C:\Users\dailyuse> cargo binstall cargo-audit --force -y
WARN Failed to read git credential file C:\Users\dailyuse\.git-credentials err=Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
INFO resolve: Resolving package: 'cargo-audit'
WARN Failed to send quickinstall report for package cargo-audit-0.18.1-x86_64-pc-windows-msvc: Failed to download from remote: could not HEAD https://warehouse-clerk-tmp.vercel.app/api/crate/cargo-audit-0.18.1-x86_64-pc-windows-msvc.tar.gz: HTTP status server error (500 Internal Server Error) for url (https://warehouse-clerk-tmp.vercel.app/api/crate/cargo-audit-0.18.1-x86_64-pc-windows-msvc.tar.gz)
WARN The package cargo-audit v0.18.1 will be downloaded from third-party source QuickInstall
INFO This will install the following binaries:
INFO - cargo-audit.exe (cargo-audit.exe -> C:\Users\dailyuse\.cargo\bin\cargo-audit.exe)
INFO Installing binaries...
INFO Done in 191.8086427s It throws a few warnings, but it works now. Still takes 3 Minutes though. |
Given that Github token is provided, I suspect this might be a network issue, or maybe related to use of http3. Can u try building this branch locally without http3 please? |
PS C:\Users\dailyuse> cargo binstall cargo-audit --force -y
INFO resolve: Resolving package: 'cargo-audit'
WARN The package cargo-audit v0.18.1 will be downloaded from third-party source QuickInstall
INFO This will install the following binaries:
INFO - cargo-audit.exe (cargo-audit.exe -> C:\Users\dailyuse\.cargo\bin\cargo-audit.exe)
INFO Installing binaries...
INFO Done in 158.4539701s With |
PS C:\Users\dailyuse\dev-src\cargo-binstall> cargo run -p cargo-binstall -- cargo-audit --force -y
Finished dev [unoptimized + debuginfo] target(s) in 0.39s
Running `C:\.cargo-target\debug\cargo-binstall.exe cargo-audit --force -y`
INFO resolve: Resolving package: 'cargo-audit'
WARN The package cargo-audit v0.18.1 will be downloaded from third-party source QuickInstall
INFO This will install the following binaries:
INFO - cargo-audit.exe (cargo-audit.exe -> C:\Users\dailyuse\.cargo\bin\cargo-audit.exe)
INFO Installing binaries...
INFO Done in 182.9846414s This PR with |
Just want to check if it's HTTP/3 causing slowdown |
The one after that comment built with default features, so no HTTP/3 and has still taken 3 minutes. |
Not sure what is wrong then. Can it be that GitHub rate limits your IP or Github token? |
Fixed #1333
gh-token
since it is broken and we can simply rungh auth token
incargo-binstall
instead._
, composes of only alphanumeric characters.git/credential
filestry_from_home
to avoid heap allocation ofPathBuf