Strange error after trying to manually edit config

I have the following config file

['remote "origin"']
   url = s3://dvc
   endpointurl = https://dagshub.com/myuser/myproject.s3

This is the product of following the dagshub tutorial here Version Control and ML Experimentation Tutorial with DagsHub – Data Versioning - DagsHub Docs

It seems this is wrong because I can not do

dvc push --all-commits

The problem is when I try to edit this file manually all dvc commands become unusable!
with the error

ERROR: Configuration error config file error extra keys not allowed @ data['remote']['origin']['access_key_id']

or simiar errors

So I have the following questions

  1. How can I add DVC remote to dagshub?
  2. How can I edit config file without my whole system become unusable?

Could you post the output of dvc doctor?