git: move credential helpers to exec path#346556
Closed
joshheinrichs-shopify wants to merge 1 commit intoNixOS:stagingfrom
Closed
git: move credential helpers to exec path#346556joshheinrichs-shopify wants to merge 1 commit intoNixOS:stagingfrom
joshheinrichs-shopify wants to merge 1 commit intoNixOS:stagingfrom
Conversation
Contributor
Author
|
I first encountered this just running |
If git-credential-osxkeychain isn't on your PATH, git will fail to find it. Moving it to git's exec path[1] allows it to be located more reliably. In other distributions such as Fedora[2] and Homebrew[3], credential helpers are not added to the user's PATH unless they are supplied by another package (e.g. git-credential-gcloud). If there are concerns that people may be relying on referencing these binaries directly we can add symlinks in bin for backwards compatibility, but that's unlikely and easy to address. [1]: https://git-scm.com/docs/git/2.46.0#Documentation/git.txt---exec-pathltpathgt [2]: https://src.fedoraproject.org/rpms/git/blob/rawhide/f/git.spec#_651 [3]: https://github.com/Homebrew/homebrew-core/blob/12120ff79ce009489b958d8271af686d74403859/Formula/g/git.rb#L112
70c4c5b to
2a203c0
Compare
Contributor
|
Mass ping, please resubmit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If git-credential-osxkeychain isn't on your PATH, git will fail to find it. Moving it to git's exec path1 allows it to be located more reliably. In other distributions such as Fedora2 and Homebrew3, credential helpers are not added to the user's PATH unless they are supplied by another package (e.g. git-credential-gcloud).
If there are concerns that people may be relying on referencing these binaries directly we can add symlinks in bin for backwards compatibility, but that's unlikely and easy to address.
This unfortunately affects a lot of packages so I haven't ran
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"to completion, but since this only affects credential helpers it's unlikely to impact other packages.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.
Footnotes
https://git-scm.com/docs/git/2.46.0#Documentation/git.txt---exec-pathltpathgt ↩
https://src.fedoraproject.org/rpms/git/blob/rawhide/f/git.spec#_651 ↩
https://github.com/Homebrew/homebrew-core/blob/12120ff79ce009489b958d8271af686d74403859/Formula/g/git.rb#L112 ↩