-
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
Git LFS asks for login 3 times at push #3318
Comments
Hi Gohur, thanks for writing in and I'm sorry that you're having
trouble. I'm not sure from what you've posted below if Git, Git LFS, or
both are the programs asking for your credentials.
To help narrow things down, perhaps could you run and paste the output
of the same command you ran below, only with `GIT_TRACE=1` in your
environment?
That should give us a sense of who is doing what, and will help pin down
where the problem is so we can fix it.
I'm going to CC @PastelMobileSuit, who may be interested in some of this
code. Thanks!
|
Hi Taylor, Interesting command. Good to know it exists.
EDIT: using a test repo to demonstrate issue |
Hey @gohurali! Thanks for opening this issue. During the normal lifetime of a request such as a push, With regards to the prompt itself, I believe that's expected behavior as well. To get credentials, From the output, it seems you don't have You should be able to fix this in one of two ways. First is to set up credential storage for git. This will allow An alternative solution would be to configure
This will cause |
I agree with what @PastelMobileSuit is saying, with this caveat:
This is the key point. It's normal for Git LFS to need your credentials more than once during an invocation of
Completely agree. This is a good way to avoid having to use a credential helper if you for some reason do not want to do so. |
Add this to your
Start your ssh agent:
Then add your key:
note your key could be named differently. |
the caching option does sound better. Thanks |
Thank you |
Isn't working for me. |
|
I can top this behavior by requesting me to type in the password 5 times, tried all of the suggestions in this issue |
me too, it was 3 times until today and it has been really annoying |
Do you by chance have a security key? I do, and I have to push it 5 times. :( |
Unlike Git, Git LFS uses multiple threads to upload and download data, and as such, it needs an SSH connection for each thread's set of credentials. So multiple SSH connections and multiple uses of the security key are pretty much expected in this case. |
For what it's worth, when I ran into this problem today, this comment by @bk2204 from #4060 put me on the right tracks, as it was necessary to both enable |
I have the same issue with SSH (Ubuntu WSL on Windows) and need to enter my passphrase always 3 times. |
I would like to warn from these steps. While the first command had no visible impact, the second simply made git fail to establish connections. 6 retries and then a fail at each push. I solved this with a reinstallation of Git-bash. To confirm this, I tested push after the reinstallation after each of these two commands. After unset, the symptoms started to appear (the 6 retries). |
Running into this same issue... I've tried reinstalling to no avail. Asks for my password 5 times - very frustrating |
Why is this closed? I shouldn't need a credentials helper or caching of credentials, it should just work like the regular git workflow. |
The Git client also uses a credentials helper to cache credentials -- that's how it works too. See, for instance, the general Git documentation on credentials and caching, and the documentation on the |
It is optional. Simple example, on a non-lfs repo: 1x touch confirm on my Yubikey for push/pull. On a lfs repo: 4x touch confirm needed Just on a surface level as a git user for me this is:
|
If you're talking about SSH, then credential helpers are not used at all, even for Git. For most forges, the Git LFS operation actually operates over HTTPS and the SSH key is simply used for authentication. Because the authentication token is time-limited, it may require multiple requests over SSH, which necessarily requires multiple SSH connections. In either case, Git and Git LFS don't share SSH sessions, nor, for HTTPS, do they share credentials without a credential helper. That's simply not possible and for HTTPS, a credential helper is the official way to share credentials between Git and Git LFS and an important reason for this functionality existing. So if you require interactivity in any way, you are guaranteed to require at least two operations if you're using both Git and Git LFS in the same operation (e.g., In any event, there are two different issues people are discussing here, which are HTTPS using token authentication and SSH using keys, which are completely different authentication schemes and work completely differently. This is also a closed issue, and I'd like to ask people to honour the contributing documentation and refrain from commenting on closed issues. If you're still seeing a problem, and there is no existing open issue that describes it and is specific to the protocol in question (HTTPS or SSH), then please open a new one, filling out the issue template completely, including reproduction steps, and mentioning the protocol you're using in the title and body of the issue. We'll then look into it and see what we can do to improve things. |
Hi All,
I've tried out git lfs for pushing my data set to my repo. It works great, however, git lfs is asking me to login three times when I push my updates. Sometimes it will ask more, but that is when I make a mistake in my login, but that makes sense. Is this done on purpose by git lfs or is this a bug that has yet to be fixed?
Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: