You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When invoking a credential helper, gix correctly calls get, but it then discards at least any password_expiry_utc before passing the result to the subsequent store invocation it correctly attempts in response to the successful use of the credential.
Expected behavior 🤔
gix should pass all details from the get stage of credential helper invocation into the store stage.
This is a bit harder: gix doesn't appear to respect http.proactiveAuth (though my testing wasn't super rigorous, so I might be wrong about that), so you'll have to be trying to access a private repo in here so that gix tries to use a cred helper at all (so, if you're using GitHub as the server, you'll have to make sure the GitHub PAT you generated has permission to read that repo's contents). Nor does gix seem to read the local .git/config as git does, so this has to go into your ~/.gitconfig instead:
While working on it I also noticed that a couple of newer fields (about a year old) also aren't supported yet. However, I took measure to make future upgrades easier to assure it's clearer where to make modifications.
Current behavior 😯
When invoking a credential helper, gix correctly calls
get
, but it then discards at least anypassword_expiry_utc
before passing the result to the subsequentstore
invocation it correctly attempts in response to the successful use of the credential.Expected behavior 🤔
gix should pass all details from the
get
stage of credential helper invocation into thestore
stage.Git behavior
https://github.com/git/git/blob/6f84262c44a89851c3ae5a6e4c1a9d06b2068d75/credential.h#L187 is where Git expresses its ability to do this; it's documented at https://git-scm.com/docs/git-credential/2.41.0#Documentation/git-credential.txt-codepasswordexpiryutccode . See the "Steps to reproduce" section to see empirically what Git does.
Steps to reproduce 🕹
Preamble
Create the following script, as
cred-helper.sh
:Make it your cred helper in some repository:
Generate a PAT in GitHub, and put it in
creds.txt
:Observe that
git fetch smaug123
passes through the password expiry to thestore
command:Observe that gix does not
This is a bit harder: gix doesn't appear to respect
http.proactiveAuth
(though my testing wasn't super rigorous, so I might be wrong about that), so you'll have to be trying to access a private repo in here so that gix tries to use a cred helper at all (so, if you're using GitHub as the server, you'll have to make sure the GitHub PAT you generated has permission to read that repo's contents). Nor does gix seem to read the local.git/config
as git does, so this has to go into your ~/.gitconfig instead:Then Cargo.toml:
src/main.rs:
And
cargo run
, observing the output:Observe that gix has not passed through
password_expiry_utc
asgit
did.The text was updated successfully, but these errors were encountered: