Does there everyone know how to treat this error ‘yaml: line 42: mapping values are not allowed in this context’
but my yaml just only 18 lines
- name: ssh
- cd /data/home/lu.com && git reset --hard && git clean -df && git pull
I’m having exactly the same problem.
Our error is : “error”:“yaml: line 14: mapping values are not allowed in this context”,"
But it’s always the same error message even if I change the repo or if I modify the .drone.yml file.
(If the file is shorter than 14 lines we still have the same error message)
But it’s really strange because everything was working fine before.
Now this error appears for some repos but not all of them.
I’m using the latest version of drone-server and drone-agent
Did you find a solution to this ?
as an aside
drone/agent was deprecated and is no longer receiving updates. you should instead be using
Thank you for your answer.
If anyone is having the same problem there is a workaround :
- remove the .drone.yaml and git push
- disable the repo on Drone and enable it again
- Put back the .drone.yaml and git push again
We ran into this particular error when inspecting network responses while under the influence of [in progress] Drone 2.0 Builds failing, not presenting output. Deleting a file then reverting the change solved it for us.