Git push with secret key

I want to push on a distant git repo so I wanna use the key parameter of the plugin appleboy/drone-git-push
The thing is if I have a secret registered and I use the parameter like

      from_secret: ssh_key

It say yaml: line 23: did not find expected key

What are the possibilities of the key parameter ?
Can I use a file ? Is it mandatory to use secrets ?

please provide a full copy of your yaml so that we can better evaluate what might be causing the yaml parsing error.

I don’t even know How to use the key parameter I just found how to use it from other post from here.
We might need some more usage/exemple for the parameters of the plugins.
Here is the .drone.yml (removed non relevent stuff)

kind: pipeline
name: default

- name: archive
  image: appleboy/drone-git-push
      from_secret: ssh_key
    remote: <remote_repo>
    remote_name: origin
    branch: master
    commit: true
    commit_message: archive commit

the reason we need to see the actual yaml is because this is a parsing error, and we need to see what might cause the error at line 23.

edit: also note that key may be referring to a more generic key / value pair and may not be referring to the named key attribute in the settings section.

Yep, understood that the “expected key” is a yaml parser error
so line 23 is the commit: true

the problem may be the path attribute which defines a new block, but is empty

-   path:
    commit: true
    commit_message: archive commit

So, Yes my bad so in the commit message I had
commit_message: [archive]
so, I changed it to commit_message: "[archive]"

The empty path was not a problem

Edit : And for my other question :

What are the possibilities of the key parameter ?
Can I use a file ? Is it mandatory to use secrets ?

I do not use this particular plugin, but would recommend directing all usage questions to the plugin author at appleboy/drone-git-push.

Will look into the other plugin.

There seem to be a bit of missing documentation on this particular parameter https://github.com/appleboy/drone-git-push/issues/37

It is the responsibility of the plugin owner to ensure accurate documentation. I recommend working with the plugin author to improve the documentation as needed. I’m sure the author would appreciate the assistance, as would other community members using this plugin.