From: Rene Schumacher <hidden> Date: 2021-01-26 14:36:07
Hi all,
I'm trying to fix an encoding (?) issue when viewing gpg signatures for commits in PowerShell Core on Windows. Apparently, git changes the output from gpg depending on the command used. Here's what I see:
git show --show-signature
This command shows strange line endings and is unable to properly display the é in my name:
commit d7a43da0bd3bc7e31dd46afb8ccd78735ba43a36 (HEAD -> master)
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time^M
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF^M
gpg: Good signature from "Ren<82> Schumacher [off-list ref]" [ultimate]^M
gpg: aka "Ren<82> Schumacher [off-list ref]" [ultimate]^M
Author: René Schumacher [off-list ref]
Date: Tue Jan 26 15:28:26 2021 +0100
Commit with signature
git verify-commit
This command does not show the line endings but still fails to properly show the é:
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
gpg: Good signature from "Ren82 Schumacher [off-list ref]" [ultimate]
gpg: aka "Ren82 Schumacher [off-list ref]" [ultimate]
git verify-commit --raw
This command does properly show the é in my name so I guess that gpg output is correct and there's something happening while git parses the gpg output:
[GNUPG:] NEWSIG
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] SIG_ID jBtyyA8QIDL0tD5fneVqJo7oU/8 2021-01-26 1611671306
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] GOODSIG 7802B995CDB4A2EF René Schumacher [off-list ref]
[GNUPG:] VALIDSIG 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 2021-01-26 1611671306 0 4 0 1 8 00 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] TRUST_ULTIMATE 0 pgp
[GNUPG:] VERIFICATION_COMPLIANCE_MODE 23
I already set the environment variable LC_ALL to C.UTF-8, which fixed the commit message output (see first screenshot) but unfortunately not the signature output. Any idea what might be causing this and how to fix it (if possible)?
Thanks!
René Schumacher
Sr. Customer Engineer
Tel: +49 89 3176 - 4908 | Mobil: +49 151 5895 5728 | mailto:rene.schumacher@microsoft.com
Microsoft Deutschland GmbH - Niederlassung Köln
Holzmarkt 2a, 50676 Köln
Microsoft Deutschland GmbH | Walter-Gropius-Str. 5 | 80807 München
Geschäftsführer: Sabine Bendiek (Vorsitzender), Thorsten Herrmann, Benjamin O. Orndorff, Keith Dolliver
Amtsgericht München, HRB 70438
From: Philippe Blain <hidden> Date: 2021-01-26 22:19:54
Hi René,
Le 2021-01-26 à 09:30, Rene Schumacher a écrit :
quoted hunk
Hi all,
I'm trying to fix an encoding (?) issue when viewing gpg signatures for commits in PowerShell Core on Windows. Apparently, git changes the output from gpg depending on the command used. Here's what I see:
git show --show-signature
This command shows strange line endings and is unable to properly display the é in my name:
commit d7a43da0bd3bc7e31dd46afb8ccd78735ba43a36 (HEAD -> master)
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time^M
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF^M
gpg: Good signature from "Ren<82> Schumacher [off-list ref]" [ultimate]^M
gpg: aka "Ren<82> Schumacher [off-list ref]" [ultimate]^M
Author: René Schumacher [off-list ref]
Date: Tue Jan 26 15:28:26 2021 +0100
Commit with signature
git verify-commit
This command does not show the line endings but still fails to properly show the é:
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
gpg: Good signature from "Ren82 Schumacher [off-list ref]" [ultimate]
gpg: aka "Ren82 Schumacher [off-list ref]" [ultimate]
git verify-commit --raw
This command does properly show the é in my name so I guess that gpg output is correct and there's something happening while git parses the gpg output:
[GNUPG:] NEWSIG
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] SIG_ID jBtyyA8QIDL0tD5fneVqJo7oU/8 2021-01-26 1611671306
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] GOODSIG 7802B995CDB4A2EF René Schumacher [off-list ref]
[GNUPG:] VALIDSIG 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 2021-01-26 1611671306 0 4 0 1 8 00 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] TRUST_ULTIMATE 0 pgp
[GNUPG:] VERIFICATION_COMPLIANCE_MODE 23
I already set the environment variable LC_ALL to C.UTF-8, which fixed the commit message output (see first screenshot) but unfortunately not the signature output. Any idea what might be causing this and how to fix it (if possible)?
What Git and GPG versions are you running ? And what Powershell version
(I don't think that matters but still, a complete environment description
usually goes a long way).
Can you come up with a reproducible example ? (Complete steps starting
with 'git init' and 'gpg --gen-key')
Cheers,
Philippe.
From: Rene Schumacher <hidden> Date: 2021-01-26 22:19:56
Hi again,
after a bit more testing and research it seems that the issue is actually caused by PowerShell's OutputEncoding, which does not default to UTF-8 (why, oh why). :(
Setting the OutputEncoding to UTF-8 fixes the problem with displaying umlauts and the é. I still don't have a clue why the git show command adds those carriage return characters (^M), though. I'll dig deeper.
René
-----Original Message-----
From: Rene Schumacher
Sent: Dienstag, 26. Januar 2021 15:30
To: git@vger.kernel.org
Subject: RE: Git Commit Signature Encoding
Hi all,
I'm trying to fix an encoding (?) issue when viewing gpg signatures for commits in PowerShell Core on Windows. Apparently, git changes the output from gpg depending on the command used. Here's what I see:
git show --show-signature
This command shows strange line endings and is unable to properly display the é in my name:
commit d7a43da0bd3bc7e31dd46afb8ccd78735ba43a36 (HEAD -> master)
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time^M
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF^M
gpg: Good signature from "Ren<82> Schumacher [off-list ref]" [ultimate]^M
gpg: aka "Ren<82> Schumacher [off-list ref]" [ultimate]^M
Author: René Schumacher [off-list ref]
Date: Tue Jan 26 15:28:26 2021 +0100
Commit with signature
git verify-commit
This command does not show the line endings but still fails to properly show the é:
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
gpg: Good signature from "Ren82 Schumacher [off-list ref]" [ultimate]
gpg: aka "Ren82 Schumacher [off-list ref]" [ultimate]
git verify-commit --raw
This command does properly show the é in my name so I guess that gpg output is correct and there's something happening while git parses the gpg output:
[GNUPG:] NEWSIG
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0 [GNUPG:] SIG_ID jBtyyA8QIDL0tD5fneVqJo7oU/8 2021-01-26 1611671306 [GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0 [GNUPG:] GOODSIG 7802B995CDB4A2EF René Schumacher [off-list ref] [GNUPG:] VALIDSIG 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 2021-01-26 1611671306 0 4 0 1 8 00 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0 [GNUPG:] TRUST_ULTIMATE 0 pgp [GNUPG:] VERIFICATION_COMPLIANCE_MODE 23
I already set the environment variable LC_ALL to C.UTF-8, which fixed the commit message output (see first screenshot) but unfortunately not the signature output. Any idea what might be causing this and how to fix it (if possible)?
Thanks!
René Schumacher
Sr. Customer Engineer
Tel: +49 89 3176 - 4908 | Mobil: +49 151 5895 5728 | mailto:rene.schumacher@microsoft.com
Microsoft Deutschland GmbH - Niederlassung Köln Holzmarkt 2a, 50676 Köln
Microsoft Deutschland GmbH | Walter-Gropius-Str. 5 | 80807 München
Geschäftsführer: Sabine Bendiek (Vorsitzender), Thorsten Herrmann, Benjamin O. Orndorff, Keith Dolliver Amtsgericht München, HRB 70438
From: Rene Schumacher <hidden> Date: 2021-01-27 09:45:06
Hi Philippe,
thanks for getting back to me so quickly! And sorry for not providing all the details right away.
I'm using Git 2.30.0.windows.1 (I believe that's the latest), gpg 2.2.27 (installed via gpg4win 3.1.15), and PowerShell 7.1.1. You might have seen my second email to the list in which I described that setting the OutputEncoding in PowerShell to UTF-8 fixed at least the display of the é (and probably all other umlauts and special printable characters). The signature output from git show --show-signatur is still printing the ^M carriage return character at the end of each line:
commit 69022a47744fcb3801572ac5d14295bcab274295 (HEAD -> master)
gpg: Signature made 26.01.2021 17:55:36 W. Europe Standard Time^M
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF^M
gpg: Good signature from "René Schumacher [off-list ref]" [ultimate]^M
gpg: aka "René Schumacher [off-list ref]" [ultimate]^M
Author: René Schumacher [off-list ref]
Date: Tue Jan 26 17:55:36 2021 +0100
another commit with signature
Since git verify-commit does not have those carriage return characters, I'm still wondering where they might come from.
Cheers,
René
-----Original Message-----
From: Philippe Blain <redacted>
Sent: Dienstag, 26. Januar 2021 20:12
To: Rene Schumacher <redacted>; git@vger.kernel.org
Subject: Re: Git Commit Signature Encoding
Hi René,
Le 2021-01-26 à 09:30, Rene Schumacher a écrit :
quoted hunk
Hi all,
I'm trying to fix an encoding (?) issue when viewing gpg signatures for commits in PowerShell Core on Windows. Apparently, git changes the output from gpg depending on the command used. Here's what I see:
git show --show-signature
This command shows strange line endings and is unable to properly display the é in my name:
commit d7a43da0bd3bc7e31dd46afb8ccd78735ba43a36 (HEAD -> master)
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time^M
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF^M
gpg: Good signature from "Ren<82> Schumacher [off-list ref]" [ultimate]^M
gpg: aka "Ren<82> Schumacher [off-list ref]" [ultimate]^M
Author: René Schumacher [off-list ref]
Date: Tue Jan 26 15:28:26 2021 +0100
Commit with signature
git verify-commit
This command does not show the line endings but still fails to properly show the é:
gpg: Signature made 26.01.2021 15:28:26 W. Europe Standard Time
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
gpg: Good signature from "Ren82 Schumacher [off-list ref]" [ultimate]
gpg: aka "Ren82 Schumacher [off-list ref]" [ultimate]
git verify-commit --raw
This command does properly show the é in my name so I guess that gpg output is correct and there's something happening while git parses the gpg output:
[GNUPG:] NEWSIG
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] SIG_ID jBtyyA8QIDL0tD5fneVqJo7oU/8 2021-01-26 1611671306
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] GOODSIG 7802B995CDB4A2EF René Schumacher
[off-list ref] [GNUPG:] VALIDSIG
3848D5B2A3D45419D7F564F97802B995CDB4A2EF 2021-01-26 1611671306 0 4 0 1
8 00 3848D5B2A3D45419D7F564F97802B995CDB4A2EF
[GNUPG:] KEY_CONSIDERED 3848D5B2A3D45419D7F564F97802B995CDB4A2EF 0
[GNUPG:] TRUST_ULTIMATE 0 pgp [GNUPG:] VERIFICATION_COMPLIANCE_MODE 23
I already set the environment variable LC_ALL to C.UTF-8, which fixed the commit message output (see first screenshot) but unfortunately not the signature output. Any idea what might be causing this and how to fix it (if possible)?
What Git and GPG versions are you running ? And what Powershell version (I don't think that matters but still, a complete environment description usually goes a long way).
Can you come up with a reproducible example ? (Complete steps starting with 'git init' and 'gpg --gen-key')
Cheers,
Philippe.
From: Philippe Blain <hidden> Date: 2021-02-09 03:17:18
Hi René,
Le 2021-01-27 à 04:41, Rene Schumacher a écrit :
quoted hunk
Hi Philippe,
thanks for getting back to me so quickly! And sorry for not providing all the details right away.
I'm using Git 2.30.0.windows.1 (I believe that's the latest), gpg 2.2.27 (installed via gpg4win 3.1.15), and PowerShell 7.1.1. You might have seen my second email to the list in which I described that setting the OutputEncoding in PowerShell to UTF-8 fixed at least the display of the é (and probably all other umlauts and special printable characters). The signature output from git show --show-signatur is still printing the ^M carriage return character at the end of each line:
commit 69022a47744fcb3801572ac5d14295bcab274295 (HEAD -> master)
gpg: Signature made 26.01.2021 17:55:36 W. Europe Standard Time^M
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF^M
gpg: Good signature from "René Schumacher [off-list ref]" [ultimate]^M
gpg: aka "René Schumacher [off-list ref]" [ultimate]^M
Author: René Schumacher [off-list ref]
Date: Tue Jan 26 17:55:36 2021 +0100
another commit with signature
Since git verify-commit does not have those carriage return characters, I'm still wondering where they might come from.
Cheers,
René
I've tried to replicate with 2.30.0.windows.2 and gpg 2.2.27 (that comes with Git-for-Windows), and could not, neither in Git Bash, Cmd, Windows Powershell or Powershell Core 7.1.1.
Maybe if you can provide a complete reproducer with all needed steps (git init, gpg --gen-key, etc)
you would get more help in the Git-for-Windows issue tracker:
https://github.com/git-for-windows/git/issues
Cheers,
Philippe.
From: Rene Schumacher <hidden> Date: 2021-02-12 10:13:37
Hi Philippe,
thank you for the feedback. Perhaps the reason really is the gpg4win installation. I'll put together all steps I followed to set up my environment and create an issue on GitHub. Thanks for pointing me to the correct repo!
Cheers,
René
-----Original Message-----
From: Philippe Blain <redacted>
Sent: Dienstag, 9. Februar 2021 04:13
To: Rene Schumacher <redacted>; git@vger.kernel.org
Subject: Re: Git Commit Signature Encoding
Hi René,
Le 2021-01-27 à 04:41, Rene Schumacher a écrit :
quoted hunk
Hi Philippe,
thanks for getting back to me so quickly! And sorry for not providing all the details right away.
I'm using Git 2.30.0.windows.1 (I believe that's the latest), gpg 2.2.27 (installed via gpg4win 3.1.15), and PowerShell 7.1.1. You might have seen my second email to the list in which I described that setting the OutputEncoding in PowerShell to UTF-8 fixed at least the display of the é (and probably all other umlauts and special printable characters). The signature output from git show --show-signatur is still printing the ^M carriage return character at the end of each line:
commit 69022a47744fcb3801572ac5d14295bcab274295 (HEAD -> master)
gpg: Signature made 26.01.2021 17:55:36 W. Europe Standard Time^M
gpg: using RSA key 3848D5B2A3D45419D7F564F97802B995CDB4A2EF^M
gpg: Good signature from "René Schumacher [off-list ref]" [ultimate]^M
gpg: aka "René Schumacher [off-list ref]" [ultimate]^M
Author: René Schumacher [off-list ref]
Date: Tue Jan 26 17:55:36 2021 +0100
another commit with signature