Skip to content
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

[Bug]: error: cannot spawn $ProgramW6432/Pragma-git/pragma-askpass: No such file or directory #4

Closed
Kotsuha opened this issue Jan 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Kotsuha
Copy link

Kotsuha commented Jan 3, 2024

Contact Details

No response

What happened?

I am trying various Git GUI clients just for fun. I see Pragma listed here so I installed it.

Later when I am working on my work repository, I found that when I execute the command git fetch in my work repository, this window pops up.

image

This is not what I expected. I click close and then skip the questions in the console. The console looks like this (some words are censored):

usr2@MSI MINGW64 /C/Users/usrpub/Projects/Foo/HelloWorld (main)
$ git fetch
fatal: helper error (-1): authentication prompt was canceled
error: cannot spawn $ProgramW6432/Pragma-git/pragma-askpass: No such file or directory
Username for 'https://github.com/Foo-Bar/HelloWorld.git':
error: cannot spawn $ProgramW6432/Pragma-git/pragma-askpass: No such file or directory
Password for 'https://github.com/Foo-Bar/HelloWorld.git':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/Foo-Bar/HelloWorld.git/'

usr2@MSI MINGW64 /C/Users/usrpub/Projects/Foo/HelloWorld (main)
$

If I uninstall Pragma then it works again.

usr2@MSI MINGW64 /C/Users/usrpub/Projects/Foo/HelloWorld (main)
$ git fetch

usr2@MSI MINGW64 /C/Users/usrpub/Projects/Foo/HelloWorld (main)
$

In the above, the work repository's remote origin URL is https. I have tried to clone it again using SSH. I install Pragma again. This time it's working fine.

usr2@MSI MINGW64 /C/tmp/HelloWorld (main)
$ git fetch
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 33 (delta 29), reused 32 (delta 29), pack-reused 0
Unpacking objects: 100% (33/33), 25.57 KiB | 101.00 KiB/s, done.
From github.com-Alice:Foo-Bar/HelloWorld
   4ef0de6ae..6e4e92d16  main        -> origin/main
   c6da3f735..33c461374  1.0         -> origin/1.0
   5de111729..bf286d670  Bob/TempUFO -> origin/Bob/TempUFO

usr2@MSI MINGW64 /C/tmp/HelloWorld (main)
$ git remote -v
origin  git@github.com-Alice:Foo-Bar/HelloWorld.git (fetch)
origin  git@github.com-Alice:Foo-Bar/HelloWorld.git (push)

I believe it has something to do with authentication? I am not familiar with this part. I don't know how to provide some information in this form, so some are skipped. If you need more information please tell me.

To reproduce

(Skipped)

Repository

No response

Expected behavior

(Skipped)

System Info and Screen shots

Information
Pragma-git version:
0.9.10

Latest available version:
0.9.10 [Download page]

nwjs version:
0.75.0(sdk)

Platform:
win32

Git version:
git version 2.31.1.windows.1

Settings folder:
C:\Users\usr2.Pragma-git

Log file:
C:\Users\usr2.Pragma-git.tmp\pragma-git-log.txt

Your system's path as seen by Pragma-git :
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0;
C:\Windows\System32\OpenSSH;
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;
C:\Program Files\7-Zip;
C:\Program Files\Git\cmd;
C:\Program Files\TortoiseHg;
C:\Program Files\Perforce;
C:\Program Files\dotnet;
C:\Program Files (x86)\GtkSharp\2.12\bin;
C:\Program Files\Nintendo\Nintendo Dev Interface;
C:\ProgramData\chocolatey\bin;
C:\Program Files\nvm;
C:\Program Files\nodejs;
C:\Program Files\Python3.10.6\Scripts;
C:\Program Files\Python3.10.6;
C:\PortableApps (CLI)\jdk-17.0.7+7\bin;
C:\PortableApps\CommonFiles\OpenJDKJRE64\bin;
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
C:\Program Files\Oracle\VirtualBox;
C:\Program Files\Microsoft SQL Server\130\Tools\Binn;
C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;
C:\Program Files\Go\bin;
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;
C:\Program Files\TortoiseGit\bin;
C:\Users\usr2\AppData\Local\Microsoft\WindowsApps;
C:\Program Files\Git\bin;
C:\PortableApps (CLI)\ffmpeg;
C:\PortableApps (CLI)\sox;
C:\PortableApps (CLI)\yt-dlp;
C:\PortableApps (CLI)\livedl;
C:\PortableApps (CLI)\JetBrains.ReSharper.CommandLineTools;
C:\PortableApps (CLI)\FART;
C:\PortableApps (CLI)\jq;
C:\PortableApps (CLI)\Neovim\bin;
C:\PortableApps (CLI)\bit;
C:\PortableApps (Not Stealth)\Arsenal-Image-Mounter;
C:\Program Files (x86)\Vim\vim90;
C:\PortableApps\cygwin-portable\cygwin\bin;
C:\PortableApps\MSYS2Portable\App\msys64\mingw64\bin;
C:\PortableApps\VSCode-Portable\VSCode\Code.exe;
C:\Users\usr2\go\bin;
C:\Users\usr2\AppData\Roaming\Python\Python310\Scripts;
C:\Users\usrpub.pyenv\pyenv-win\bin;
C:\Users\usrpub.pyenv\pyenv-win\shims;
C:\Users\usr2.dotnet\tools;
C:\Users\usr2\AppData\Local\JetBrains\Toolbox\scripts;

License:
MIT license.

@Kotsuha Kotsuha added the bug Something isn't working label Jan 3, 2024
pragma-git pushed a commit that referenced this issue Jan 11, 2024
- GCM core is default credential helper as of Git for Windows 2.29
- askpass is therefore now disabled for windows (but maintained for macos and linux)
@pragma-git
Copy link
Owner

Thank you for trying pragma-git, and reporting this issue!

The pop-up window you reported was from what I understand introduced in Git version 2.27 (see for instance https://github.com/git-ecosystem/git-credential-manager).

The error fatal: helper error (-1): authentication prompt was canceled when you did a git fetch is due to closing the popup window.

The error cannot spawn $ProgramW6432/Pragma-git/pragma-askpass: No such file or directory may possibly be connected to above. I did not understand if you could still input your token for user-name, and blank for password on the command line, and perform the git fetch correctly?

I assume the idea is that both commmand line git and many gui git clients will be using this new credential manager for windows, instead of reinventing features such as authentication tokens and two-factor authentications. If you have any further insights, please share them with me!

Please let me know if I have misunderstood anything, or if above reply makes sense?

I plan to make the next release for git > 2.29 and rely on the new built-in popup window for login. Please let me know if you have any thoughts about if this is a good idea, or not.

pragma-git pushed a commit that referenced this issue Jan 15, 2024
TODO: Make setting to enable default manager
(problem is that if multiple repositories without credentials, settings opens multiple pop-up credential windows. It is impossible to know which repository they are coming from)
@Kotsuha
Copy link
Author

Kotsuha commented Jan 16, 2024

When the window pops up, if I click "Sign in with your browser", it opens a browser and then I can type in GitHub Username or email address and Password, and then the fetch will be successful. The problem is the window shows up every time I do git fetch.

I did not understand if you could still input your token for user-name, and blank for password on the command line, and perform the git fetch correctly?

C:\Users\usr2\Downloads\New folder\Hello (main -> origin)
λ git fetch
error: cannot spawn $ProgramW6432/Pragma-git/pragma-askpass: No such file or directory
Username for 'https://github.com/Foo-Bar/Hello.git': alice@foobar.com (I TYPE MY EMAIL HERE)
error: cannot spawn $ProgramW6432/Pragma-git/pragma-askpass: No such file or directory
Password for 'https://alice@foobar.com@github.com/Foo-Bar/Hello.git': (I TYPE MY PASSWORD HERE)
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Foo-Bar/Hello.git/'

C:\Users\usr2\Downloads\New folder\Hello (main -> origin)
λ

Is a video recording helpful? If it helps I can record my screen in the weekend.

@pragma-git
Copy link
Owner

A video would be very helpful. Please show both the Pragma-git problem, and the command-line problems.

@Kotsuha
Copy link
Author

Kotsuha commented Feb 5, 2024

I am back, very quick indeed😫

I cannot reproduce the issue anymore. During the time some changes have been made to my computer (install docker, update Git version, etc.) maybe one of them change the condition.

@pragma-git
Copy link
Owner

Thanks for the update, and for reporting this issue.

You have experienced a problem caused by a modified git config. From now on, pragma-git does not change git config, which means that this issue should be solved.

Version 0.9.11 has been released with this bug fix. Please try it, and report any problems! And thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants