gnupg

Change the binary that Git uses to invoke GnuPG for signing commits?

我与影子孤独终老i 提交于 2019-12-03 13:13:03
I'm signing my commits in Git using GnuPG. I'd prefer it greatly if Git would use /usr/bin/gpg2 rather than /usr/bin/gpg for signing commits for some compatibility reasons. Is there a Git configuration setting which will allow me to set which GnuPG binary to use during signing? I haven't been able to find one. You could try and set the right config: git config gpg.program gpg2 From git config man page : Use this custom program instead of " gpg " found on $PATH when making or verifying a PGP signature. 来源: https://stackoverflow.com/questions/38366490/change-the-binary-that-git-uses-to-invoke

PGP-signing multipart e-mails with Python

喜你入骨 提交于 2019-12-03 12:37:18
I'm currently trying to add PGP signing support to my small e-mail sending script (which uses Python 3.x and python-gnupg module). The code that signs message is: gpg = gnupg.GPG() basetext = basemsg.as_string().replace('\n', '\r\n') signature = str(gpg.sign(basetext, detach=True)) if signature: signmsg = messageFromSignature(signature) msg = MIMEMultipart(_subtype="signed", micalg="pgp-sha1", protocol="application/pgp-signature") msg.attach(basemsg) msg.attach(signmsg) else: print('Warning: failed to sign the message!') (Here basemsg is of email.message.Message type.) And messageFromSignature

Gradle uploadArchives task unable to read secret key

╄→гoц情女王★ 提交于 2019-12-03 11:34:15
问题 I have created a gradle project and everything builds fine, but when I try to upload to my Maven repository, I get the following Gradle error: FAILURE: Build failed with an exception. * What went wrong: Could not evaluate onlyIf predicate for task ':library:signArchives'. > Unable to read secret key from file: C:\Users\ideal\pubring.gpg (it may not be a PGP secret key ring) I followed the instructions at Sonatype to generate the key, then copied it from its generated location to the location

what is the best/easiest to use encryption library in python [closed]

孤街浪徒 提交于 2019-12-03 09:55:09
I want to encrypt few files using python what is the best way I can use gpg/pgp using any standard/famous python libraries? PyCrypto seems to be the best one around. Try KeyCzar Very easy to implement. I use GPGme The main strength of GPGme is that it read and writes files at the OpenPGP standard ( RFC 4880 ) which can be important if you want to interoperate with other PGP programs. It has a Python interface . Warning: it is a low-level interface, not very Pythonic. If you read French, see examples . Here is one, to check a signature: signed = core.Data(sys.stdin.read()) plain = core.Data()

Adding a OpenPGP signature to an already signed document? [closed]

我怕爱的太早我们不能终老 提交于 2019-12-03 08:30:30
We'd like to implement a workflow that requires multiple people to digitallly sign a document. If I have multiple secret keys in my own keychain, I can do something as simple as: gpg --sign -u userid1 -u userid2 filename But what do I do if I've got an already signed document and I want to add a signature? One solution would be to have everyone generate detached signatures for the document, and then package them all together in a zip file or something, but the overhead there is substantially higher. Is there a better way? No need to ZIP them: you can simply concatenate detached signatures in a

How to run gpg from a script run by cron?

試著忘記壹切 提交于 2019-12-03 08:19:56
问题 I have a script that has a part that looks like that: for file in `ls *.tar.gz`; do echo encrypting $file gpg --passphrase-file /home/$USER/.gnupg/backup-passphrase \ --simple-sk-checksum -c $file done For some reason if I run this script manually, works perfectly fine and all files are encrypted. If I run this as cron job, echo $file works fine (I see "encrypting <file>" in the log), but the file doesn't get encrypted and gpg silent fails with no stdout/stderr output. Any clues? 回答1: It

GPG (PGP) decryption in client side web applications

萝らか妹 提交于 2019-12-03 07:38:03
问题 How would I be able to decrypt some encrypted data on the client side of a web application? E.g. The data is stored encrypted on the server. It was encrypted using a public GPG key. The server sends the encrypted to the client. The client needs to decrypt it using their local private key. Assumably I would be able to pass the private key to the browser and use Javascript to decrypt the data. 回答1: If you want to stick with JavaScript, then have a look at the LGPL library OpenPGP.js. 回答2: I

Gradle uploadArchives task unable to read secret key

旧城冷巷雨未停 提交于 2019-12-03 05:19:06
I have created a gradle project and everything builds fine, but when I try to upload to my Maven repository, I get the following Gradle error: FAILURE: Build failed with an exception. * What went wrong: Could not evaluate onlyIf predicate for task ':library:signArchives'. > Unable to read secret key from file: C:\Users\ideal\pubring.gpg (it may not be a PGP secret key ring) I followed the instructions at Sonatype to generate the key, then copied it from its generated location to the location listed above. I have also published the public key to MITs key repository. The gradle.properties file

IntelliJ fails to commit changes when attempting to sign commit (GPG)

被刻印的时光 ゝ 提交于 2019-12-03 04:54:21
I have been working on setting up my development environment, so when I create a commit it is automatically signed by GPG. I followed Githubs documentation on the matter here: https://help.github.com/categories/gpg/ . I am attempting to use IntelliJ's git interface to create a commit, but it always fails with this error. gpg: cannot open `/dev/tty`: Device not configured error: gpg failed to sign the data fatal: failed to write commit object I do not encounter this error when using git directly from my terminal, I discovered an issue where someone had a similar problem (with Source Tree) and

GPG vs SSH keys

核能气质少年 提交于 2019-12-03 04:38:57
On GitHub, I want to add a key to associate my computer with my account and I am given two options: create an SSH or a GPG key. What is the difference between the two keys? and is there a preferred one to use? I understand how to create both by following the guide on the site but I don't know which one is better to use. I want to add a key to associate my computer with my account and I am given two options You will need at least the SSH one, if you want to push back to your repository, using an SSH URL (since the public SSH key will authenticate you). Start with SSH. See " Connecting to GitHub