2016-08-24 28 views
0

如果在命令行的git我签字承诺在PowerShell中ISE(如管理员或没有)我得到以下错误:PowerShell ISE中的Git GPG签名提交错误

C:\Users\MyName\myrepo> git commit -S -m "Testing signed commit in PowerShell ISE."

git : gpg: WARNING: unsafe permissions on homedir 'C:\Users\Jerry\AppData\Roaming\gnupg' At line:1 char:1 + git commit -S -m "Testing signed commit in PowerShell ISE." + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (gpg: WARNING: u...\Roaming\gnupg':String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError gpg : cannot open tty no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object

在命令提示符和PowerShell控制台签名提交工作(作为管理员或不),所以我猜GPG与ISE有问题?该错误确实表示权限在“homedir”(其中gnupg存在于其中)上是不安全的,但我不知道如何使此目录的Windows权限符合GPG的要求(如果这甚至是问题)。

任何帮助非常感谢,谢谢!

回答

0

GnuPG不喜欢任何人,但你自己的用户帐户能够读写GnuPG主目录的内容(在你的情况下为C:\Users\Jerry\AppData\Roaming\gnupg),尤其是对于包含的私钥文件而言。

删除您自己的任何其他用户帐户的权限,这可能是opening the properties and removing permissions

另一种方法是设置git使用--no-permission-warning标志,但这只是一种解决方法,并不能真正解决问题。