I live in Cloverleaf SD but work in the city of Ashland. Do I have to file taxes in both? Should I get credited for paying in one and not the other?

Ashland City is telling me I should be paying full taxes in the city I work in and partial to the SD i live in but Cloverleaf SD is telling me the opposite. Which one is correct?