My University provides a self-hosted GitLab (via the joint datacenter of the cities universities and research organisations) and it's really, really nice.
I think you can't really ask your students to sign up to anything or use anything that isn't hosted or provided by the university. And even for stuff provided by the university, you shouldn't be forced to use any particular software. As a mechanical engineer, I had to take CS intro class and they made us use Visual Studio. I never liked that class.