-
-
Notifications
You must be signed in to change notification settings - Fork 350
password_expiry_utc
is discarded from credential helper
#1998
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
Comments
Thanks a lot for reporting! 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. |
Byron
added a commit
that referenced
this issue
May 14, 2025
Byron
added a commit
that referenced
this issue
May 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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: