-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Use git credential helper #1871
Use git credential helper #1871
Conversation
Ideally I would like to do something like to scope it to a repository, can we somehow hand the repository down?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
According to gh-auth-login
doc, the token could be stored in a system credential store, it only fallbacks if it's not available.
I suggest to fallback to git, if gh-auth-token fails
@NobodyXu thanks, makes sense. Do you see a way to scope the token per repository, that's what we're doing in CI for security reason. Or does cargo-binstall need a token valid for all repositories it attempts to download? |
Yes, it currently just reuses the same github-token for every repository of the crates to install. |
I also want to say that on my system, using |
Hum that's interesting. But your I don't use |
Yes, I can push to git, because that uses ssh keys. |
Ah got it |
Pinging @ChrisBr do you want to continue this PR or do you want me to take over? |
Please take over but let me know if you run into any issues. |
Signed-off-by: Jiahao XU <[email protected]>
Signed-off-by: Jiahao XU <[email protected]>
4372849
to
4a01320
Compare
Signed-off-by: Jiahao XU <[email protected]>
4a01320
to
6e46f66
Compare
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall) | patch | `v1.10.8` -> `v1.10.13` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>cargo-bins/cargo-binstall (cargo-bins/cargo-binstall)</summary> ### [`v1.10.13`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.13) [Compare Source](cargo-bins/cargo-binstall@v1.10.12...v1.10.13) *Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.* ##### In this release: - Use git credential helper for github token auto discovery (can be disabled via `--no-discover-github-token`) ([#​1871](cargo-bins/cargo-binstall#1871)) ##### Other changes: - Upgrade transitive dependencies ### [`v1.10.12`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.12) [Compare Source](cargo-bins/cargo-binstall@v1.10.11...v1.10.12) *Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.* ##### In this release: - Speedup installation script by avoiding additional network trip ##### Other changes: - Upgrade dependencies (hickory-dns, thiserror, file-format, etc). ### [`v1.10.11`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.11) [Compare Source](cargo-bins/cargo-binstall@v1.10.10...v1.10.11) *Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.* ##### In this release: - Upgrade dependencies to fix compilation failures due to yanked dependency fs4 0.10 ### [`v1.10.10`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.10) [Compare Source](cargo-bins/cargo-binstall@v1.10.9...v1.10.10) *Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.* ##### In this release: - Use rc-zip-sync for zip extraction ([#​1080](cargo-bins/cargo-binstall#1080) [#​1942](cargo-bins/cargo-binstall#1942)) - Better UI: default to "yes" for installation prompt, and display more readable message for the prompt ([#​1943](cargo-bins/cargo-binstall#1943) [#​1948](cargo-bins/cargo-binstall#1948) [#​1950](cargo-bins/cargo-binstall#1950) ) ##### Other changes: - Upgrade dependencies ([#​1949](cargo-bins/cargo-binstall#1949)) ### [`v1.10.9`](https://github.com/cargo-bins/cargo-binstall/releases/tag/v1.10.9) [Compare Source](cargo-bins/cargo-binstall@v1.10.8...v1.10.9) *Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`.* ##### In this release: - Upgrade dependencies </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Instead of using
gh
we should use the built ingit
credential helper to get a valid token. I think we could even get rid of reading the credentials files manually as git should be able to just do this for us.What we're essentially doing is
Ideally we would even hand down a path so the token could be scoped to a single repository.
https://git-scm.com/docs/gitcredentials