gnupg

Avoid gpg signing prompt when using Maven release plugin

情到浓时终转凉″ 提交于 2019-11-29 22:57:19
I've got a Maven project that I'm trying to configure to use the maven release plugin. Part of the release process is to use the Maven GPG Plugin to sign artifacts which requires among other things, the GPG signing key passphrase to succeed. Because these builds need to be runnable in a non interactive environment, (CI-Server) these params are passed in as arguments to maven in the form of -Dgpg.passphrase=XXX For snapshot builds everything works fine; the Maven GPG Plugin sees the passed in passphrase, artifacts are built, signed and deployed as expected, however, when I try to use the

Calculate multiple checksums from the same InputStream using DigestInputStream

强颜欢笑 提交于 2019-11-29 22:46:16
问题 I am trying to figure out how to read multiple digests (md5, sha1, gpg) based on the same InputStream using DigestInputStream . From what I've checked in the documentation, it seems to be possible by cloning the digest. Could somebody please illustrate this? I don't want to be re-reading the stream in order to calculate the checksums. 回答1: You could wrap a DigestInputStream around a DigestInputStream and so on recursively: DigestInputStream shaStream = new DigestInputStream( inStream,

Is there a good GnuPG encryption library for Java/Scala? [closed]

戏子无情 提交于 2019-11-29 20:46:47
I would like to be able to encrypt files on disk and/or data in memory using GnuPG from a Java application. If possible I'd like to avoid having to make system calls out to the GPG command line tools. Is there a recommended library, or can you recommend the best approach to GPG encrypting from Java (or Scala)? I'm developing and intend to run the application in a Linux environment, although a cross-platform solution would be preferred. You can try to call the JAVA API of BouncyCastle.org . Its documentation mentions: The Bouncy Castle Crypto package is a Java implementation of cryptographic

Generating a GPG key for git tagging

喜欢而已 提交于 2019-11-29 20:37:00
I'm trying to create signed tags in GitHub using the git command line. I generated a GPG key with a (sample) username Full Name (skytreader) <fullname@gmail.com> . Having done that, I try to create a signed tag . However I get the following error: gpg: skipped "full <fullname@gmail.com>": secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the data error: unable to sign the tag I figure that I just need to create another key with the indicated username. But then, entering the name "full", gpg complains that my name should be at least 5 characters

OpenSSL vs GPG for encrypting off-site backups?

冷暖自知 提交于 2019-11-29 20:15:15
Given the option between using GPG and OpenSSL for local encryption before pushing archives to an off-site backup location, what are the benefits and drawbacks of each solution? Background: I currently manage a server infrastructure based on Ubuntu 14.04.1 with all current patches applied as they become available. All of these systems are headless, automatically built using vetted preseeds and automation tools, and run in virtual machines via KVM on uniform Intel-based hardware. We have a preference for Ruby, but a stronger preference for "doing things correctly". Because of both, we've chosen

gpg: can't connect to the agent: IPC connect call failed

痴心易碎 提交于 2019-11-29 11:58:16
问题 I am having a problem while trying to decrypt some keys using GPG. The following output is given to me: gpg: can't connect to the agent: IPC connect call failed I already edited some files, pointed in this tutorial: https://michaelheap.com/gpg-cant-connect-to-the-agent-ipc-connect-call-failed/ but with no success. Possible reasons for that? Thanks in advance 回答1: There is probably already a gpg-agent running on the system, which your gpg command is unable to connect to. If you do a pkill -9

GPG automatic decryption password passing

余生长醉 提交于 2019-11-29 08:37:50
We receive GPG encrypted files from a third party. I'm modifying a C# program that finds the encrypted files, decrypts them, and deletes the encrypted ones. It all works except during the decryption part it prompts for a phassphrase; I know the passphrase and it works when entered. I need to pass the passphrase in the command so the prompt never appears. string CommandText = string.Format("echo {0}|gpg.exe --keyring {1} --secret-keyring {2} --batch --yes --passphrase-fd 0 -o {3} -d {4}", passPhrase, publicKeyRingPath, secretKeyRingPath, outputFullPath, encryptedFilePath); I have also tried:

PGP/GPG Signed Python code

爱⌒轻易说出口 提交于 2019-11-29 08:25:42
问题 I'd like to (PGP/GPG) sign python code. Yes, I have read this and many other sites that talk about protecting and obfuscating python code - this all is not what I want. I DON'T want to obfuscate code. I want customers and users to see the code, they could modify code, copy it and make derivative work, I'd like to have the software under the GPLv3. But I want to have plugins that are "signed", so they can be kind of trusted during execution. Is this possible in Python? Can I import a library

gpg --passphrase-fd not working with python 3 subprocess

拈花ヽ惹草 提交于 2019-11-29 05:20:09
The following script encrypt_me.py ( modified from another post ) encrypts itself with gpg and prints out the ciphertext in armored form. However it only works on python2.7 but not python3? Do you have any idea what's wrong when it's running on python3? import subprocess import shlex import os import sys in_fd, out_fd = os.pipe() passphrase = 'passsssphrase' os.write(out_fd, passphrase.encode('utf-8')) os.close(out_fd) cmd = 'gpg --passphrase-fd {fd} -c --armor'.format(fd=in_fd) with open(__file__,'r') as stdin_fh: proc=subprocess.Popen(shlex.split(cmd), stdin=stdin_fh, stdout=sys.stdout) proc

GnuPG Wrapper with C#

白昼怎懂夜的黑 提交于 2019-11-29 05:14:32
I use GnuPG and C# to encrypt files with imported public keys. But when I try to make encryption, GnuPG encrypt file with public key of main user. I'm sure that I pass right recipient. Benton You can try using my open source and free GnuPG wrapper for C# (and VB.NET). All the code is licensed via MIT, non-GPL restrictions. You can find the release with source code at CodePlex. Look for the Alpha release to find the GPG library. http://biko.codeplex.com/ Example: GnuPG gpg = new GnuPG(); gpg.Recipient = "myfriend@domain.com"; FileStream sourceFile = new FileStream(@"c:\temp\source.txt",