5

我们有一个 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 个零长度文件

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

4

2 回答 2

7

--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显示目录已更改。

于 2013-08-29T14:41:01.537 回答
1

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

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\GNU\GnuPG]
"HomeDir"="c:\\edit this\\.gnupg"
于 2014-12-22T00:23:46.197 回答