* Bug in git-gui
@ 2024-09-29 17:05 Clemens Haffner
2024-09-29 17:43 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Clemens Haffner @ 2024-09-29 17:05 UTC (permalink / raw)
To: git
Hi,
I think I found a bug in git-gui on Windows (Windows 10 64 bit)
git-gui Version 0.21.GITGUI
git Version: 2.44.0.windows.1
To reproduce: (I have not tested it with rsa keys)
- Create an ed25519 key with a passphrase (--> .ssh/id_ed25519).
Help->Show ssh key detects that key perfectly and shows the Public key
to copy
- Push something to a repository:
--> it will fail.
> Pushing to xxx.xxx:clemens/test_repo.git
> CreateProcessW failed error:193
> ssh_askpass: posix_spawnp: Unknown error
> git@git.xxx.xxx: Permission denied (publickey).
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
- When using a key without a passphrase, it works perfectly well.
- When using ssh-agent with a key that uses a passphrase, it also works
well.
> Pushing to git.xxx.xxx:clemens/test_repo.git
> To git.xxx.xxx:clemens/test_repo.git
> = [up to date] rev1 -> rev1
> updating local tracking ref 'refs/remotes/origin/rev1'
> Everything up-to-date
this bug must be in git gui, as it works perfectly fine via git bash.
"git push" spawns a new window, which asks for the passphrase. After
entering the phrase git works as intended.
It seems to me that the git gui cant spawn that window where it asks for
the key.
If that helps:
I'm using Microsofts OpenSSH implementation:
> $ ssh -V
> OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
Greetings,
Clemens Haffner
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in git-gui
2024-09-29 17:05 Bug in git-gui Clemens Haffner
@ 2024-09-29 17:43 ` Johannes Schindelin
2024-09-29 17:44 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2024-09-29 17:43 UTC (permalink / raw)
To: Clemens Haffner; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 2049 bytes --]
Hi Clemens,
On Sun, 29 Sep 2024, Clemens Haffner wrote:
> Hi,
>
> I think I found a bug in git-gui on Windows (Windows 10 64 bit)
>
> git-gui Version 0.21.GITGUI
> git Version: 2.44.0.windows.1
>
> To reproduce: (I have not tested it with rsa keys)
>
> - Create an ed25519 key with a passphrase (--> .ssh/id_ed25519). Help->Show
> ssh key detects that key perfectly and shows the Public key to copy
> - Push something to a repository:
> --> it will fail.
>
> > Pushing to xxx.xxx:clemens/test_repo.git
> > CreateProcessW failed error:193
> > ssh_askpass: posix_spawnp: Unknown error
> > git@git.xxx.xxx: Permission denied (publickey).
This might be due to the `SSH_ASKPASS` environment variable pointing to a
Unix-style path, but your SSH not being Unix-path-aware.
Can you verify that your `SSH_ASKPASS` environment variable is set to
`/mingw64/bin/git-askpass.exe`? If so, can you set it to `/c/Program
Files/Git/mingw64/bin/git-askpass.exe` instead and try again?
Ciao,
Johannes
> > fatal: Could not read from remote repository.
> >
> > Please make sure you have the correct access rights
> > and the repository exists.
>
> - When using a key without a passphrase, it works perfectly well.
> - When using ssh-agent with a key that uses a passphrase, it also works well.
>
> > Pushing to git.xxx.xxx:clemens/test_repo.git
> > To git.xxx.xxx:clemens/test_repo.git
> > = [up to date] rev1 -> rev1
> > updating local tracking ref 'refs/remotes/origin/rev1'
> > Everything up-to-date
>
> this bug must be in git gui, as it works perfectly fine via git bash.
>
> "git push" spawns a new window, which asks for the passphrase. After entering
> the phrase git works as intended.
>
> It seems to me that the git gui cant spawn that window where it asks for the
> key.
>
> If that helps:
> I'm using Microsofts OpenSSH implementation:
>
> > $ ssh -V
> > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
>
> Greetings,
> Clemens Haffner
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in git-gui
2024-09-29 17:43 ` Johannes Schindelin
@ 2024-09-29 17:44 ` Johannes Schindelin
2024-09-29 18:35 ` Clemens Haffner
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2024-09-29 17:44 UTC (permalink / raw)
To: Clemens Haffner; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]
Hi Clements,
On Sun, 29 Sep 2024, Johannes Schindelin wrote:
> On Sun, 29 Sep 2024, Clemens Haffner wrote:
>
> > I think I found a bug in git-gui on Windows (Windows 10 64 bit)
> >
> > git-gui Version 0.21.GITGUI
> > git Version: 2.44.0.windows.1
> >
> > To reproduce: (I have not tested it with rsa keys)
> >
> > - Create an ed25519 key with a passphrase (--> .ssh/id_ed25519). Help->Show
> > ssh key detects that key perfectly and shows the Public key to copy
> > - Push something to a repository:
> > --> it will fail.
> >
> > > Pushing to xxx.xxx:clemens/test_repo.git
> > > CreateProcessW failed error:193
> > > ssh_askpass: posix_spawnp: Unknown error
> > > git@git.xxx.xxx: Permission denied (publickey).
>
> This might be due to the `SSH_ASKPASS` environment variable pointing to a
> Unix-style path, but your SSH not being Unix-path-aware.
>
> Can you verify that your `SSH_ASKPASS` environment variable is set to
> `/mingw64/bin/git-askpass.exe`? If so, can you set it to `/c/Program
> Files/Git/mingw64/bin/git-askpass.exe` instead and try again?
Oh, make that `c:/Program Files/Git/mingw64/bin/git-askpass.exe`, i.e. a
Windows-style path but with forward slashes as directory separators.
Ciao,
Johannes
> > > fatal: Could not read from remote repository.
> > >
> > > Please make sure you have the correct access rights
> > > and the repository exists.
> >
> > - When using a key without a passphrase, it works perfectly well.
> > - When using ssh-agent with a key that uses a passphrase, it also works well.
> >
> > > Pushing to git.xxx.xxx:clemens/test_repo.git
> > > To git.xxx.xxx:clemens/test_repo.git
> > > = [up to date] rev1 -> rev1
> > > updating local tracking ref 'refs/remotes/origin/rev1'
> > > Everything up-to-date
> >
> > this bug must be in git gui, as it works perfectly fine via git bash.
> >
> > "git push" spawns a new window, which asks for the passphrase. After entering
> > the phrase git works as intended.
> >
> > It seems to me that the git gui cant spawn that window where it asks for the
> > key.
> >
> > If that helps:
> > I'm using Microsofts OpenSSH implementation:
> >
> > > $ ssh -V
> > > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
> >
> > Greetings,
> > Clemens Haffner
> >
> >
> >
> >
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in git-gui
2024-09-29 17:44 ` Johannes Schindelin
@ 2024-09-29 18:35 ` Clemens Haffner
0 siblings, 0 replies; 4+ messages in thread
From: Clemens Haffner @ 2024-09-29 18:35 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Hi Johannes,
you were on the right track:
- if I set the env variable (as a normal Windows Enviroinment variable) to
c:/Program Files/Git/mingw64/bin/git-askpass.exe
the GUI does indeed (almost) work as intended.
Almost, because while git-askpass is running, a console window is open
in the background. ssh works though.
- however, with the variable set to this, git bash does not work anymore
(waits infinitely on commands like "git push").
It doesnt even work when set to mingw-style
/c/Program Files/Git/mingw64/bin/git-askpass.exe
- If I start git-gui from within the mingw bash, it does even work
without the variable set. (The console window still appears though).
So, to fix this git-gui needs to be aware of the enviroinment variable
when launched through the start menu.
I'm not familiar with the source code, but I guess
git-gui/windows/git-gui.sh
would be the file that is responsible for that.
Greetings,
Clemens
Am 29.09.2024 um 19:44 schrieb Johannes Schindelin:
> Hi Clements,
>
> On Sun, 29 Sep 2024, Johannes Schindelin wrote:
>
>> On Sun, 29 Sep 2024, Clemens Haffner wrote:
>>
>>> I think I found a bug in git-gui on Windows (Windows 10 64 bit)
>>>
>>> git-gui Version 0.21.GITGUI
>>> git Version: 2.44.0.windows.1
>>>
>>> To reproduce: (I have not tested it with rsa keys)
>>>
>>> - Create an ed25519 key with a passphrase (--> .ssh/id_ed25519). Help->Show
>>> ssh key detects that key perfectly and shows the Public key to copy
>>> - Push something to a repository:
>>> --> it will fail.
>>>
>>>> Pushing to xxx.xxx:clemens/test_repo.git
>>>> CreateProcessW failed error:193
>>>> ssh_askpass: posix_spawnp: Unknown error
>>>> git@git.xxx.xxx: Permission denied (publickey).
>> This might be due to the `SSH_ASKPASS` environment variable pointing to a
>> Unix-style path, but your SSH not being Unix-path-aware.
>>
>> Can you verify that your `SSH_ASKPASS` environment variable is set to
>> `/mingw64/bin/git-askpass.exe`? If so, can you set it to `/c/Program
>> Files/Git/mingw64/bin/git-askpass.exe` instead and try again?
> Oh, make that `c:/Program Files/Git/mingw64/bin/git-askpass.exe`, i.e. a
> Windows-style path but with forward slashes as directory separators.
>
> Ciao,
> Johannes
>
>>>> fatal: Could not read from remote repository.
>>>>
>>>> Please make sure you have the correct access rights
>>>> and the repository exists.
>>> - When using a key without a passphrase, it works perfectly well.
>>> - When using ssh-agent with a key that uses a passphrase, it also works well.
>>>
>>>> Pushing to git.xxx.xxx:clemens/test_repo.git
>>>> To git.xxx.xxx:clemens/test_repo.git
>>>> = [up to date] rev1 -> rev1
>>>> updating local tracking ref 'refs/remotes/origin/rev1'
>>>> Everything up-to-date
>>> this bug must be in git gui, as it works perfectly fine via git bash.
>>>
>>> "git push" spawns a new window, which asks for the passphrase. After entering
>>> the phrase git works as intended.
>>>
>>> It seems to me that the git gui cant spawn that window where it asks for the
>>> key.
>>>
>>> If that helps:
>>> I'm using Microsofts OpenSSH implementation:
>>>
>>>> $ ssh -V
>>>> OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
>>> Greetings,
>>> Clemens Haffner
>>>
>>>
>>>
>>>
>>>
>>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-29 18:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-29 17:05 Bug in git-gui Clemens Haffner
2024-09-29 17:43 ` Johannes Schindelin
2024-09-29 17:44 ` Johannes Schindelin
2024-09-29 18:35 ` Clemens Haffner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).