-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish API: "json: cannot unmarshal array into Go struct field .Signing of type api.SigningOptions" #1266
Comments
what is the reason for adding the array ? in our api calls we just pass a dict: could you try this ? |
That one didn't work for me either unfortunately. Up until now, I have succeeded with unencrypted PGP keys. It's also unusual that it returns
In the Logs of aptly:
|
looks like the keyring is not found. where is it stored ? we are using something similar to this:
this uses |
When using an encrypted PGP key and delivering the passphrase, publishing fails with HTTP status code 400 and the response body
{"error":"json: cannot unmarshal array into Go struct field .Signing of type api.SigningOptions"}
Detailed Description
When using a GPG key that was generated with a passphrase, publishing a repo via API fails (cropped output):
This seems to be related to: json - cannot unmarshal array into Go struct when decoding array| StackOverflow
Context
Storing private keys in an encrypted manner is a security feature, I'd like to keep. As the aptly API can be made accessible TLS-encrypted behind a reverse proxy, delivering the passphrase in cleartext to the aptly API endpoint isn't a security risk either.
Possible Implementation
In api/publish.go:102, changing
Signing SigningOptions
toSigning []SigningOptions
could solve it, if it's related to above mentioned StackOverflow issue (I haven't tested it)Your Environment
Docker with Dockerfile (excerpt):
The text was updated successfully, but these errors were encountered: