{"thread":{"id":"49538","subject":"[version 2.19.1] gpg issue in new Git for Windows release version 2.19.1","startedAt":"2018-10-11T09:45:57Z","lastAt":"2018-10-11T09:45:57Z","messageCount":1,"participants":["Himanshu Singh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"360163","messageId":"CAB5xbUV3HM0afTuD3PGZoLM2t04A+SH9Ue-tY4-tLS3pv6UC2w@mail.gmail.com","threadId":"49538","inReplyTo":null,"subject":"[version 2.19.1] gpg issue in new Git for Windows release version 2.19.1","fromName":"Himanshu Singh","fromEmail":"himanshu.kumar.singh@gmail.com","sentAt":"2018-10-11T09:45:41Z","receivedAt":"2018-10-11T09:45:57Z","isPatch":false,"sender":{"key":"himanshu.kumar.singh@gmail.com","avatar":null},"body":"Hi,\nI use git-repo which makes use of Git for Windows and also uses the\ngpg tool bundled in Git for Windows.\n\nI am able to run the git-repo with Git-2.18.0-64-bit.exe, but recently\nI updated the Git to  new release of Git for Windows 2.19.1 and that\ndoes not work with git-repo tool. I found that basic issue is not with\nGit, but with gpg bundled with latest Git version.\n\nI have tested both version for below 4 cases and here are the test\nresults in below table:\n\nCase Test Description Result For Git-2.18.0-64-bit.exe Result For\nGit-2.19.1-64-bit.exe\nCASE1: gpg import with default GNUPG Home [Result: SUCCESS for both versions]\nCASE2: gpg import with setting environment variable for GNUPGHOME and\npath provided in git style [Result: SUCCESS for both versions]\nCASE3: gpg import with setting environment variable for GNUPGHOME and\npath provided in windows style single slash \\ is escaped by providing\ndouble slash \\\\ [Result: SUCCESS for 2.18.0 but FAILED for 2.19.1]\nCASE4: gpg import with setting environment variable for GNUPGHOME and\npath provided in windows style with single slash \\  replaced with\nforward slash / [Result: SUCCESS for 2.18.0 but FAILED for 2.19.1]\n\nI know the gpg version is changed in 2.19 release.\nBut somehow the Git-Repo tool, which I am using, creates GNUPGHOME\npath as per CASE3 above. So right now I am able to use the tool with\nolder version of Git. It may be issue in future to not upgrade Git.\nPlease see if this makes any sense to fix this thing in gpg.\n\n\nHere is the output with CASE3 (complete logs attached with the mail)\n==============================================================================================================\n=== CASE3: NOT Working with setting environment variable for GNUPGHOME\nand path provided in windows style ====\n=== IT LOOKS Like concatenate the current working directory to the\nvalue of GNUPGHOME ========================\n==============================================================================================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ export GNUPGHOME=C:\\\\gpgTesting\\\\.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ echo $GNUPGHOME\nC:\\gpgTesting\\.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: keyblock resource\n'/c/gpgTesting/C:\\gpgTesting\\.gnupg/pubring.kbx': No such file or\ndirectory\n\ngpg: signal Interrupt caught ... exiting\n\n\n--\nThanks,\nHimanshu Singh.\n\n\n====================\n=== Version Info === \n====================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ git --version\ngit version 2.19.1.windows.1\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --version\ngpg (GnuPG) 2.2.9-unknown\nlibgcrypt 1.8.3\nCopyright (C) 2018 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nHome: /c/Users/hsingh/.gnupg\nSupported algorithms:\nPubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA\nCipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,\n        CAMELLIA128, CAMELLIA192, CAMELLIA256\nHash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224\nCompression: Uncompressed, ZIP, ZLIB, BZIP2\n\n\n\n\n==============================================\n=== CASE1: Working with default GNUPG Home ===\n==============================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: keybox '/c/Users/hsingh/.gnupg/pubring.kbx' created\n\ngpg: signal Interrupt caught ... exiting\n\n\n\n\n=====================================================================================================\n=== CASE2: Working with setting environment variable for GNUPGHOME and path provided in git style ===\n=====================================================================================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ export GNUPGHOME=/C/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ echo $GNUPGHOME\n/C/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: keybox '/C/gpgTesting/.gnupg/pubring.kbx' created\n\ngpg: signal Interrupt caught ... exiting\n\n\n\n\n==============================================================================================================\n=== CASE3: NOT Working with setting environment variable for GNUPGHOME and path provided in windows style ====\n=== IT LOOKS Like concatenate the current working directory to the value of GNUPGHOME ========================\n==============================================================================================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ export GNUPGHOME=C:\\\\gpgTesting\\\\.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ echo $GNUPGHOME\nC:\\gpgTesting\\.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: keyblock resource '/c/gpgTesting/C:\\gpgTesting\\.gnupg/pubring.kbx': No such file or directory\n\ngpg: signal Interrupt caught ... exiting\n\n\n\n\n================================================================================================================================\n=== CASE4: NOT Working with setting environment variable for GNUPGHOME and path provided in windows style with forward slash ===\n=== IT LOOKS Like concatenate the current working directory to the value of GNUPGHOME ==========================================\n================================================================================================================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ export GNUPGHOME=C:/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ echo $GNUPGHOME\nC:/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: Fatal: can't create directory '/c/gpgTesting/C:/gpgTesting/.gnupg': No such file or directory\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$\n\n====================\n=== Version Info === \n====================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ git --version\ngit version 2.18.0.windows.1\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --version\ngpg (GnuPG) 1.4.22\nCopyright (C) 2015 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nHome: ~/.gnupg\nSupported algorithms:\nPubkey: RSA, RSA-E, RSA-S, ELG-E, DSA\nCipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,\n        CAMELLIA128, CAMELLIA192, CAMELLIA256\nHash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224\nCompression: Uncompressed, ZIP, ZLIB, BZIP2\n\n\n\n\n==============================================\n=== CASE1: Working with default GNUPG Home ===\n==============================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: keyring `/c/Users/hsingh/.gnupg/secring.gpg' created\ngpg: keyring `/c/Users/hsingh/.gnupg/pubring.gpg' created\n\ngpg: Interrupt caught ... exiting\n\n\n\n\n=====================================================================================================\n=== CASE2: Working with setting environment variable for GNUPGHOME and path provided in git style ===\n=====================================================================================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ export GNUPGHOME=/C/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ echo $GNUPGHOME\n/C/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: WARNING: unsafe permissions on homedir `/C/gpgTesting/.gnupg'\ngpg: keyring `/C/gpgTesting/.gnupg/secring.gpg' created\ngpg: keyring `/C/gpgTesting/.gnupg/pubring.gpg' created\n\ngpg: Interrupt caught ... exiting\n\n\n\n\n=========================================================================================================\n=== CASE3: Working with setting environment variable for GNUPGHOME and path provided in windows style ===\n=========================================================================================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ export GNUPGHOME=C:\\\\gpgTesting\\\\.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: WARNING: unsafe permissions on homedir `C:\\gpgTesting\\.gnupg'\ngpg: keyring `C:\\gpgTesting\\.gnupg/secring.gpg' created\ngpg: keyring `C:\\gpgTesting\\.gnupg/pubring.gpg' created\n\ngpg: Interrupt caught ... exiting\n\n\n\n\n============================================================================================================================\n=== CASE4: Working with setting environment variable for GNUPGHOME and path provided in windows style with forward slash ===\n============================================================================================================================\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ export GNUPGHOME=C:/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ echo $GNUPGHOME\nC:/gpgTesting/.gnupg\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting\n$ gpg --import\ngpg: WARNING: unsafe permissions on homedir `C:/gpgTesting/.gnupg'\ngpg: keyring `C:/gpgTesting/.gnupg/secring.gpg' created\ngpg: keyring `C:/gpgTesting/.gnupg/pubring.gpg' created\n\ngpg: Interrupt caught ... exiting\n\nhsingh@HSINGH-LT MINGW64 /c/gpgTesting"}]}