keybase / node-installer

An installer/updater for the node client.
BSD 3-Clause "New" or "Revised" License
117 stars 9 forks source link

[Windows] Install failed - Exit code 2 #48

Open janus-rose opened 10 years ago

janus-rose commented 10 years ago

Similar to the OSX install fail reported in https://github.com/keybase/node-installer/issues/24

C:>keybase-installer -d debug: + cmd.run 0.1.11 debug: ++ Installer::run debug: +++ Installer::test_gpg debug: --- Installer::test_gpg -> OK debug: +++ Installer::test_npm debug: --- Installer::test_npm -> OK debug: +++ Installer::test_npm_install debug: ||| Writing temporary file, to see if install will work: C:\Program Files \nodejs.keybase_test_install_8079f2db3286713ba601 debug: ||| Unlinking file: C:\Program Files\nodejs.keybase_test_install_8079f2d b3286713ba601 debug: --- Installer::test_npm_install info: Made temporary directory: C:\Users\USER~1\AppData\Local\Temp\keybase_ins tall_pPo9LZEuDQAZeiTfd_YwDA debug: +++ Make new permanent keychain debug: ||| mkdir_p parent C:\Users\USER.keybase-installer debug: --- Made new permanent keychain debug: +++ Make/check empty pubring C:\Users\USER.keybase-installer\ke yring\pubring.gpg debug: ||| Found one debug: --- Made/check empty pubring -> true debug: +++ Make/check empty secring C:\Users\USER.keybase-installer\ke yring\secring.gpg debug: ||| Found one debug: --- Made/check empty secring -> true debug: || Call to gpg: { args: [ '-k', '--with-fingerprint', '--with-colons' ], debug: quiet: true } debug: || Mutate GPG args; new args: --no-default-keyring --keyring C:\Users\USER.keybase-installer\keyring\pubring.gpg --secret-keyring C:\Users\USER.keybase-installer\keyring\secring.gpg --trustdb-name C:\Users\USER.keybase-installer\keyring\trustdb.gpg -k --with-fingerprint --with-colon s info: cleaning up tmpdir C:\Users\USER~1\AppData\Local\Temp\keybase_install_pP o9LZEuDQAZeiTfd_YwDA error: exit code 2 warn: usage: gpg [options] [filename]

maxtaco commented 10 years ago

Can you give me a -d output? Thanks! On Mar 15, 2014 5:25 PM, "Joshua Kopstein" notifications@github.com wrote:

Similar to the OSX install fail reported in #24https://github.com/keybase/node-installer/issues/24

C:>keybase-installer info: Made temporary directory: C:\Users\USER~1\AppData\Local\Temp\keybase_ins tall_1xDackDepOGgVEpRJqwttQ info: cleaning up tmpdir C:\Users\USER~1\AppData\Local\Temp\keybase_install_1x DackDepOGgVEpRJqwttQ error: exit code 2 warn: usage: gpg [options] [filename]

Reply to this email directly or view it on GitHubhttps://github.com/keybase/node-installer/issues/48 .

janus-rose commented 10 years ago

@maxtaco - that was the -d ^

maxtaco commented 10 years ago

Oh I see. Didn't show up on mobile for some reason. Ok, I'll take a look.

maxtaco commented 10 years ago

Which version of GPG do you have? Try gpg --version. Thanks

janus-rose commented 10 years ago

gpg (GnuPG) 2.0.20 (Gpg4win 2.1.1)

maxtaco commented 10 years ago

I'm using 2.0.22 and 2.2.1, wouldn't expect too big a difference. I'll try to install your version to see what happens.

janus-rose commented 10 years ago

Yea, I just upgraded to Gpg4win 2.2.1 and got same error.

maxtaco commented 10 years ago

Yeah, and I got Gpg4win 2.1.1 working fine.

Which shell are you using?

maxtaco commented 10 years ago

I see the issue! Man, I don't understand windows. Seems like you're getting this:

--keyring C:\Users\USER.keybase-installer\keyring\pubring.gpg

whereas I really need you to have something like

--keyring C:\Users\USER~1\.keybase-installer\keyring\pubring.gpg

maxtaco commented 10 years ago

Acutally.... that's wonky, but that doesn't explain gpg's unwillingness to run

janus-rose commented 10 years ago

Which shell are you using?

Just the regular cmd prompt in Windows

Acutally.... that's wonky, but that doesn't explain gpg's unwillingness to run

Ahh Github won't let me put forward-slashes into the paste (probably to prevent injection attacks). All of those USER entries should be followed by "forward-slash dot" not just "dot"

Yea, not sure what's happening here. Never had a problem with running GPG to do anything else.

maxtaco commented 10 years ago

Ok, here's another idea, do you have anything non-standard in your gpg.conf file? In particular, do you specify keyring locations? We've had a bunch of issues here in the past.

janus-rose commented 10 years ago

Nope I've never edited the conf file, should be a standard installation

janus-rose commented 10 years ago

As noted in https://github.com/keybase/node-installer/issues/51 it looks like having a space in your username is what's causing this error. (Mine has a space but I replaced it with "USER" in the above paste.)

Running this works:

keybase-installer -k "C:\Users\USER~1.keybase-installer\keyring"

egp commented 10 years ago

I had the same problem due to a space in my username, and the workaround with -k solved the symptom for me on the install command. However, there are other commands still failing; "keybase id egp" gets an error "error: gpg exited with code 2 warn: usage: gpg [options] [filename]" also due to space in username