I spin my own git server with raspberry pi and I also use gitea. Github has nothing to do with this restrictions they're merely following US laws they don't have a say in that. All US companies have to comply with trade restrictions. Whatever you do please do not host all your code in one single point of failure.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.