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
GitLFS does not ask for credentials on Windows #2349
Comments
@larsxschneider thanks for opening this up. This is on my list of things to look at, and I have a few preliminary ideas of what might be going on. I'm finishing up the 2.2.0 release and will have more time to look at this after that. |
Same issue here. In my case, I'm running lfs 2.2.0 on Windows 10 (Build 15063). When I try to checkout a branch of a private GitHub repository, I get the error message below, telling me that credentials were not found. After encountering the error, I installed Git-Credential-Manager-for-Windows. That didn't fix anything. Any suggestions would be helpful (including obvious or fundamental ones, since I'm still trying to get my head around git and lfs). Error message:
|
@Toby-D thanks -- I spent some time looking into this today and my current line of thinking is that this is a bug in the way that Git for Windows invokes Git LFS. I've replied here with more. Even though that issue pertains to absent credential helpers, I think that the underlying bug would affect this case, as well. |
git-lfs calls "git credential fill" without a terminal connection (it's how it uses golang os/exec in). If you do not set GIT_ASKPASS, git will try to use the terminal, and that will fail. In git-for-windows you can use the git credential.hepler "manager" (=Windows Credential Manager interface), that uses a window popup to ask user/pass details. On cygwin git I use GIT_ASKPASS calling the msys libexec git-gui--askpass written in TK, that pops up a dialog when I use the git credential.helper "cache". |
This bug is almost 1 yo and seems to be still in code (I have the same issue as OP)
didn't help in my case (no popup has popped up) EDIT: I managed to fix it by entering creds in Control Panel > User Accounts>Credential Manager > Windows Credentials. EDIT2: Looks like I had old version of git installed (2.15). Installing git 2.17.1 seems to fix this issue |
@dscho is this fixed in 2.17.1? |
@ttaylorr I don't know ;-) I have no recollection of fixing much prompt-related, apart from git-for-windows/git@b339cda (which might have fixed this here issue?) I do not recall any changes in the way sub-processes are spawned, except that we now try to restrict inherited file handles. Not sure whether this would have the effect of fixing this here issue. |
I have my own askpass set in GIT_ASKPASS and git-lfs does not translate path with 'cygwin -w' and therefore fails. Same for the cert file: (useless info obfuscated :-)
|
|
Well, I am with cygwin. :-) I will open another bug for cygwin translation patch. |
Oh, sorry, I naturally translate "on Windows" to "Git for Windows"... |
I'm here with git version 2.31.1.windows.1 and the problem still seems to be there... |
Do you have |
If you clone a private repository and there is no Git credential helper installed then Git should ask for the credentials once and Git LFS should ask for the credentials at least once.
It should look like this:
That works nicely on macOS but not on Windows 7/8/10 with Git LFS 2.1.1 (in cmd.exe and git-bash). On Windows GitLFS does not ask for the credentials and consequently the LFS file download fails.
c.f. git-for-windows/git#1192
The text was updated successfully, but these errors were encountered: