SquaredTiki / Dringend-Issues

Public issue tracker for the Dringend app, an iPad dev environment
dringend.cc
16 stars 0 forks source link

Pasting in valid private key results in "Unable to add key" error #100

Closed quixoticraindrp closed 9 years ago

quixoticraindrp commented 9 years ago

I just purchased and downloaded Dringend onto my iPad, and am setting up ssh access to my local git server.

In the "Keys" entry, I have the private key on the iPad clipboard (verified by pasting into a text document), but pasting the key into Dringend results in:

"Unable to add key The pasteboard does not contain a valid private key"

I verified the key is correct, and is in the clipboard in its entirety (and no extraneous spaces).

SquaredTiki commented 9 years ago

In order for Dringend to register that the pasteboard contains a private key the currently copied string must contain the string PRIVATE KEYas all DSA and RSA private keys do. Can you confirm that the copied string contains PRIVATE KEY?

quixoticraindrp commented 9 years ago

I also tried the key without the -----BEGIN ... and the -----END lines, just the proc-type, DEK-Info, and the key itself, as well as only the key without anything, and none of it worked. (I presume, as is true of most other key-using systems, that the -----BEGIN and -----END lines are actually required, so I made sure to use the entire thing first)

SquaredTiki commented 9 years ago

For example:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,65028140A749D47090A321A293EAF2DE

<key data>
-----END RSA PRIVATE KEY-----
quixoticraindrp commented 9 years ago

Yes. That was the first thing I tried.

quixoticraindrp commented 9 years ago

-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC,6DEBEF3AA0DAD895ED7ACCE1F9881230

-----END RSA PRIVATE KEY-----
quixoticraindrp commented 9 years ago

with the key proper in between, of course. Edited for obvious reasons ;)

SquaredTiki commented 9 years ago

Strange, I just directly copied that key from the email GitHub sent me and Dringend correctly detected it on the pasteboard with no error. Could you try pasting it into another app, say Notes, and then copying it again?

quixoticraindrp commented 9 years ago

Worked from Notes.

Did not work from Evernote or Pages (possibly due to the LF/CR character?)

Thanks for your help!

SquaredTiki commented 9 years ago

Could be though I think it may be because Evernote or Pages formatted it as rich text rather than plain text. No worries, glad we got it working!