-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
3 to 5 prompts for ssh hardware key authorization #5784
Comments
Hey, thanks for the report! If there's a way to reproduce the issue without a YubiKey, that would be great, and even better if it can be spelled out step-by-step. That would likely speed up anyone who is able to take a look at the issue, and perhaps more importantly, would allow us to set up automated CI tests that can demonstrate that any changes are effective in addressing the problem. And I should say, patches are always very welcome as a contribution to the project! |
I think the issue is specifically about a hardware key being used because if you just take a regular password protected key, you could say the solution is to use credentials manager/caching. Because each key access requires physical interaction with the hardware key, credential manager does not work as a cache in this case, at least with my testing. |
I set up LFS for the first time and I'm experiencing the same annoyance. I'm using an This details my setup. |
Also affected. This is with an active SSH ControlMaster set, so for a regular git push I normally only have to use the SSH key once every 4 hours. Here's an excerpt from Is there any way I configure git-lfs to reuse the already existing ControlMaster connection instead of making a new one not only once, but two times per push?
Git config:
|
@cfstras -- Good question, and thanks for the lines from a trace log! Looking over the code, particularly that from the PRs #4446, #5223, and #5537, I notice a couple of things which may be going on here. When the So, if that function is called more than once, it's going to use a separate socket path each time. And it appears that during a Git push operation, the Call Stacks
With some refactoring, we might be able to avoid the second call altogether, or at least reuse the same socket control path. Then, separately, if the Again, with some refactoring, perhaps we could reuse the same socket control path here, if one had been established already. There's also the question of whether we could add a Some time and attention will be required to get this refactoring done, along with an improved and revised test suite, so with apologies, I won't make any guesses as to when it might be completed. (Contributions are always very much appreciated, of course.) |
@cfstras (or others who've had a version of this problem) -- Out of interest, what happens if you set
But leave your SSH configuration file with the settings you gave above, particularly something like:
Does that help at all? With For me, that appears to mean the Git LFS client just runs the same multiple SSH commands, but without any extra multiplexing arguments, and SSH appears to then use the control socket established by the first one (given an SSH configuration like the one above).
Do you see something similar? |
Confirmed that works for me, thank you! No additional security key presses needed in an LFS repo. |
Describe the bug
When using Yubikey PIV for git ssh configured with touch-only authorization, every push to a lfs enabled repo requires multiple (3-5) confirmations. Enabling PIN would make the experience even worse.
3 prompts if there are no new objects, 5 prompts if there are additional lfs objects.
Same behavior when using password protected ssh key.
~/.ssh/config
Related: #3318
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A single confirmation
System environment
Debian KDE
Additional context
Afaik credentials helper is not an option due to presence requirement.
The text was updated successfully, but these errors were encountered: