Because you've sold something you've received cash (or at least an entry on your brokerage statement to say you've got cash) so you should record that as a credit in your brokerage account in GnuCash. The other side of the entry should go into another account that you create called something like "Open Positions" and is usually marked as a Liability account type (if you need to mark it as such).
If you want to keep an accurate daily tally of your net worth you can add a new entry to your Open Positions account and offset that against Income which will be either negative or positive depending on how the position has moved for/against you. You can also do this at a lower frequency or not at all and just put an entry in when your position closes out because you bought it back or it expired or it was exercised.
My preferred method is to have a single entry in the Open Positions account with an arbitrary date near when I expect it to be closed and each time I edit that value (daily or weekly) so I only have the initial entry and the current adjust to look at which reduces the number of entries and confusion if there are too many.