From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Transparent encrypt and decrypt token file with gpg2 in Emacs. Date: Wed, 9 Jun 2021 23:12:52 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39473"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 09 17:28:21 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lr07w-000AAy-UG for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Jun 2021 17:28:20 +0200 Original-Received: from localhost ([::1]:55824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lr07v-0006OE-Us for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Jun 2021 11:28:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqztD-0004wA-OL for help-gnu-emacs@gnu.org; Wed, 09 Jun 2021 11:13:07 -0400 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:36756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqztC-0005bN-9g for help-gnu-emacs@gnu.org; Wed, 09 Jun 2021 11:13:07 -0400 Original-Received: by mail-lf1-x135.google.com with SMTP id v22so37249599lfa.3 for ; Wed, 09 Jun 2021 08:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=cclOGunNToCJaOKONhgodTUY/OFMA4iomy5rQXS43cU=; b=U50btRfOWVoPfzVMpiVIct03jnw7ZECojEa3QnwKKcJqSBklcgN91Oq4lLGc96lLdm eAqM4JOzIQvnWmSTD38E52CJF5eB3fAZrHMcJnqcgVznBQNjJnzu3f2KdA808BRpGSxl c8igWA6IVmP4xi+FPbQ98ygVdq/86xBbIanA/6piPeCyod76huz/XjHi3N122GUfjP/y KXAeRSuY68jCIBdFpgsHwSRRRgad1xCvVGXCzbHG7zihK2nZ1YJoV6WZJj/HQyaU6SVI f7/elWaSvOQ/VsO5fE/yDmyy8VmtDL6jS9f/unDAmUrcdN88w98OIQY0eYNsN3ZJUo7v TSoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=cclOGunNToCJaOKONhgodTUY/OFMA4iomy5rQXS43cU=; b=Sr6fTVZTnKpByqMUK1BAdn8FG7MoMDRi9PmH5TRBROhsjW7G7urEBx9XM7nGiu8Mso L8drkznjPKLa0gLyM3f5hzcHOhALiA2bsatWYLb5sW468LKcpnbf9QummyTjyYyJ5seg Kjrt2aluZMZBhu0MhgnPSdKHW23OkHMHINtDSvWWnDzE8jhkAlVMrIxJHsFkCCEU4Uol 00astmAQFVmLlyj5EnkNjHV3CAx6pKZ2a9tEtYrun+mBbp10t8YtUSfPuOZF1xvYfBKn K3IYGTuLAZCecJLOWAMrNcDGr9dYfq2aUSDpTCqqcr19G0tdpcnY9kvxQ0Gg7qx05x6j 7HBg== X-Gm-Message-State: AOAM530DU39mOROt5L2gJ9b1sWlZuzTNTB8UuCQe3r26ti9/30GIjBlk bfTq8J6A8g5/i7qPMEW0kAWhaFZc0iy2S1KBVC+UAOzmIgXT08BVbco= X-Google-Smtp-Source: ABdhPJy1sBubfokqHRz8YZMGiT5reErk2uKwl3vptGTFS5vKbar4kvRObt24ygVQDSlLGPKppog9FYCOHDjb4bwCPzQ= X-Received: by 2002:a05:6512:1144:: with SMTP id m4mr45844lfg.390.1623251583603; Wed, 09 Jun 2021 08:13:03 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130675 Archived-At: On Ubuntu 20.04, I store the API token in a file with an extension name gpg. Then I load this file in init-file. But when I always notice that when the content of the token file is read by Emacs, the following error will be triggered: In the *Error* buffer: Error while decrypting with "/usr/bin/gpg2": gpg: no valid OpenPGP data found. gpg: decrypt_message failed: Unknown system error In the *Message* buffer: Loading /home/werner/DvdMgr/screen2latex.el.git/auth.el.gpg... Decrypting /home/werner/DvdMgr/screen2latex.el.git/auth.el.gpg...done epa-file-insert-file-contents: Opening input file: Can't decrypt, No data (no armored data); No data (expected a packet but did not find one); Exit Mark set [4 times] Any hints for solving this problem? Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China