Skip to content

Credentials helper launching in all its variety #496

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 244 commits into from
Sep 5, 2022
Merged

Conversation

Byron
Copy link
Member

@Byron Byron commented Aug 22, 2022

Tasks

  • consider protocol.*.allow
  • credentials
    • support helper functions (instead of programs) no need, only interesting for testing actually
    • git-command to spawn commands 'git-style' and eventually also hooks, somewhat similar to run-command.c.
    • support for custom credential helper programs and usage of the credential.helper configuration (via git-sec)
    • credentials context
    • custom credential helper programs and test
    • custom prompts via git-prompt
      • askpass
      • proper prompts
      • an expectrl driven test
  • configuration of credential-helpers with url-based config.
    • empty string clears list
    • url normalization to not stumble over trailing slashes (minimal, probably not as complete)
    • useHttpPath
    • patterns in the domain
    • case-sensitivity
    • username (if not provided by the url we matched against)
  • find a way to not use hardcoded defaults. Do it by injecting a global configuration file based on git invocations.
    - on MacOS /usr/bin/git the 'system' config is scope 'unknown' and would need to be parsed via -l --show-origin and the first line is the path. '--system' is not present. On windows, --system works as expected and these count as installation directory.
  • support overriding the credentials helper (while allowing it to launch the built-in one) with a custom function
  • take another look at the tests skipped on linux
  • gix remote refs for non-symbolic remote, like in PR checkouts
  • gix credential as equivalent to git credential, just for fun

Next PR

  • filter remote refs by ref-spec and provide information on which local refs would be updated (TBD next)
  • refactor: git-sec remove tag from Access, make a check that only returns on Option, ignoring Deny.

Out of scope

  • proxy support
  • mirror support
  • All information related to pushing
  • promisor objects
  • branch.<name>.merge support, as we don't yet merge anything and fetching still fetches the entire refspec of as configured in the remote.

Predecessor

Byron added 30 commits August 22, 2022 21:45
It's special as it creates its own repository.
Previously this was hard-coded to `radicle`, now it's just an extension
scheme along with a statically known string. This means we have to
explicitly support new formats which should be fine.
…upport (#450)

No leniency because it's hard to decide what to do, allowing connections
is probably not it, so better fail with the correct error message.
…450)

This wasn't supposed to happen but a requirement to get `serde` support
back.
It's actually used and useful.
align usage of stdin and stdout to factor it elsewhere.
avoid using actual credentials helper where none is required
…module. (#450)

Also allow to pass arbitrary bytes (more or less) as context by not
forcing it all into a string. Values can now be everything, which
helps with passing paths or other values.
Byron added 23 commits September 3, 2022 14:07
…mes. (#450)

Have to represent names or urls seprately or risk this to be a hazard
for any caller.
Conflicts:
	cargo-smart-release/Cargo.toml
	experiments/diffing/Cargo.toml
	experiments/object-access/Cargo.toml
	experiments/traversal/Cargo.toml
	git-attributes/Cargo.toml
	git-config/Cargo.toml
	git-odb/Cargo.toml
	git-pack/Cargo.toml
	git-ref/Cargo.toml
	git-repository/Cargo.toml
	git-url/Cargo.toml
	gitoxide-core/Cargo.toml
Needs integration with Repo configuration, which includes prompt
options actually.
When true, default false, inject the git installation configuration file
if present at the cost of one `git config` invocation.

Note that we rely on the underlying `git-config` crate to not load
duplicate files.

We also currently lie about the scope which is actually unclear - have
seen 'unknown' or normal scopes like `system`.
#450)

This is important as it may contain additional credential helper
configuration that we definitely need to find the credentials that
git usually finds.
@Byron Byron merged commit 5c05198 into main Sep 5, 2022
@Byron Byron deleted the filter-refs-by-spec branch September 5, 2022 11:00
This was referenced Sep 5, 2022
@Byron Byron mentioned this pull request Sep 16, 2022
8 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant