The report on replacing a rear wheel bearing recommends loosening the nipple of the brake line with a ring spanner and not with a spanner.
And then you might try to get a ring key on that nipple. That didn't work out, it won't work out. For this you need to use a so-called 'Open-end' ring key. Hexagonal and an opening through which you can get it over the brake line on the nipple….