You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to use the New() method to create a transport for use in my github client, but I am having trouble with my RSA key being parsed. When I used NewKeyFromFile() everything worked fine, but swapping to New() and feeding in a string of the key as a byte gives me the following error: could not parse private key: Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key. I am confused by this because in transport_test.go you are doing it the exact same way and I have to assume the tests are passing. I'm not sure if this is an issue in ghinstallation or go-github. Am I missing something?
I can't reproduce this, filling in var key with the private key from transport_test.go.
Are you sure you're reading the private key from disk correctly (and not passing the file name for example)?
This would be an issue with ghinstallation rather than the github package because if authentication is failing, it's happening before you reach github.NewClient.
Hi, I am trying to use the
New()
method to create a transport for use in my github client, but I am having trouble with my RSA key being parsed. When I usedNewKeyFromFile()
everything worked fine, but swapping toNew()
and feeding in a string of the key as a byte gives me the following error:could not parse private key: Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key
. I am confused by this because intransport_test.go
you are doing it the exact same way and I have to assume the tests are passing. I'm not sure if this is an issue in ghinstallation or go-github. Am I missing something?ghinstallation/transport_test.go
Lines 27 to 53 in d680810
New()
:ghinstallation/transport_test.go
Line 167 in d680810
My code is like this:
The text was updated successfully, but these errors were encountered: