Github: GPG key passphrase not accepted, Atom can't commit staged changes

Created on 16 May 2017  路  7Comments  路  Source: atom/github

Description

When I attempt to commit my staged changes, I'm correctly prompted for my GPG key's passphrase. I use Keybase so, after opening my password manager and copying my Keybase password, I paste it into the prompt. However, the github package doesn't accept this passphrase and instead fails to create my commit.

Steps to Reproduce

  1. Stage some changes via git
  2. Type in a commit message and press the "Commit" button
  3. Paste Keybase passphrase into prompt

Expected behavior:

The github package to creates a new commit

Actual behavior:

The following error is shown:

https://cdn.davidcel.is/screens/Screen-Shot-2017-05-16-12-03-20.png

12:02:56.616970 git.c:371               trace: built-in: git 'commit' '-m' 'WIP'
12:02:56.735330 run-command.c:369       trace: run_command: '/Applications/Atom Beta.app/Contents/Resources/app/node_modules/github/bin/gpg-no-tty.sh' '--status-fd=2' '-bsau' '2B0016D7'
error: gpg failed to sign the data
fatal: failed to write commit object

Reproduces how often:

100% of the time

Versions

# atom --version
Atom    : 1.16.0
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0

# apm --version
apm  1.16.1
npm  3.10.5
node 6.9.5 x64
python 2.7.13

# git --version
git version 2.13.0
hub version 2.2.9

# gpg --version
gpg (GnuPG/MacGPG2) 2.0.30
libgcrypt 1.7.0

Additional Information

The project I am attempting to create a commit with has its own compiled version of git in the bin/ directory. My $PATH contains ./bin as the first entry, but I'm not sure what atom considers its working directory. If the working directory is whatever project is being used, then its using this custom built git. However, I am able to run git commit using this custom git and sign my own commits just fine.

committing git

Most helpful comment

I can repro this locally, so this is a regression, not just something with your GPG setup :smile: I'm on it 馃攳

In the meantime, you can work around this by configuring a different pinentry-program in ~/.gnupg/gpg-agent.conf, like this one:

$ brew install pinentry-mac
$ cat ~/.gnupg/gpg-agent.conf
# Store key credentials in the Mac keyring
pinentry-program /usr/local/bin/pinentry-mac
$ killall gpg-agent  # Not sure if this is strictly necessary

All 7 comments

I can repro this locally, so this is a regression, not just something with your GPG setup :smile: I'm on it 馃攳

In the meantime, you can work around this by configuring a different pinentry-program in ~/.gnupg/gpg-agent.conf, like this one:

$ brew install pinentry-mac
$ cat ~/.gnupg/gpg-agent.conf
# Store key credentials in the Mac keyring
pinentry-program /usr/local/bin/pinentry-mac
$ killall gpg-agent  # Not sure if this is strictly necessary

I've got the same issue on Windows 7, so I'll be following

I've got the same issue on Windows 10 as well, so I'll be following.

Same issue, pinentry-mac solved it but I preferred the native Atom prompt. Following.

@jonbrohauge @joshuacherry I wrote up a temporary fix for windows if you are interested in getting this working before its fixed in atom/atom

I have this issue on Windows 7 x64 with Atom 1.22.1 x64 as well. Is there any progress or news on a fix for this?

so this bug report has these relations with other similar issues caused by sa,e root problem, historically refer to https://github.com/atom/github/pull/846 and possible solution in
https://github.com/atom/github/issues/1373

Newer related bug reports, which IMO treat as duplicate of this is https://github.com/atom/github/issues/1518

Temporary fixes not withstanding here is a trail of breadcrumbs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smashwilson picture smashwilson  路  4Comments

ccavolt picture ccavolt  路  3Comments

jazeee picture jazeee  路  3Comments

HidekiHokuto picture HidekiHokuto  路  4Comments

simurai picture simurai  路  3Comments