【问题标题】:gpg --homedir change directory not workinggpg --homedir 更改目录不起作用
【发布时间】:2020-09-05 14:48:19
【问题描述】:

我们有一个 Windows 2008 r2 服务器。我们安装了 gpg4win 并且它工作正常。我们可以创建公钥和私钥,并为那些拥有我们公钥的人解密消息。

问题

gnu 安装默认为我的用户配置文件,我们希望它位于通用配置文件之下。

我们创建了一个目录c:\gpg_keys

根据 gnu 网站上的文档:

    gpg --homedir /my/path/ 
    to make GnuPG create all its files in that directory. " 
    When we run this command this is windows install: 
    gpg --homedir c:\gpg_keys\          the return is: 
    gpg: keyring `c://gpg_keys//secring.gpg' created 
    gpg: keyring `c://gpg_keys//pubring.gpg' created 
    gpg: Go ahead and type your message ...

进程停止???

当我们查看目标目录时:

    08/28/2013  05:14 PM                 0 pubring.gpg    
    08/28/2013  05:14 PM                 0 secring.gpg.lock 
    08/28/2013  05:14 PM                 0 pubring.gpg.lock 
    08/28/2013  05:14 PM                 0 secring.gpg 

创建了 4 个零长度文件

请问有什么方法可以移动 home 的目标目录吗??

【问题讨论】:

    标签: gnupg


    【解决方案1】:

    --homedir 显然不起作用,但以下操作:

    Home directory:
      ===============
      GnuPG makes use of a per user home directory to store its keys as well
      as configuration files.  The default home directory is a directory
      named "gnupg" below the application data directory of the user.  This
      directory will be created if it does not exist.  Being only a default,
      it may be changed by setting the name of the home directory into the
      Registry under the key HKEY_CURRENT_USER\Software\GNU\GnuPG using the
      name "HomeDir".  If an environment variable "GNUPGHOME" exists, this
      even overrides the registry setting.  The command line option
      "--homedir" may be used to override all other settings of the home
      directory.
    

    检查--version 显示目录已更改。

    【讨论】:

    • 更改 --homedir 似乎弄乱了关键代理。它是 gpg4win 中的一个主要 bug,到现在已经开放了大约两年。我已经向他们的问题跟踪器提交了一份错误报告:wald.intevation.org/tracker/… Let's home 它得到了一些关注。如果我有时间和一点想法从哪里开始,我会自己解决它。
    • 设置 GNUPGHOME 环境变量适用于 GPG4Win 2.2.3。 --homedir 选项不起作用。
    • Humbads 上面的评论应该是一个完整的答案。这对我有用,我觉得它比此处发布的其他答案更清洁。
    【解决方案2】:

    这是一个 .reg 文件形式的现成解决方案。将其粘贴到 example.reg 中,编辑、保存,然后双击生成的文件。

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\GNU\GnuPG]
    "HomeDir"="c:\\edit this\\.gnupg"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-10
      • 2019-01-23
      • 2016-03-14
      • 1970-01-01
      • 2013-10-12
      • 1970-01-01
      相关资源
      最近更新 更多