In this example I'll use Bitbucket, but it works with any git service, like GitLab, OneDev, Gogs and others.
If the import tool does not work, perform the following steps.
Create an empty repository on Github.
Example: https://github.com/fabianocouto/repo.git
Clone repository hosted on another git service using --bare parameter
$ git clone --bare [email protected]:fabianocouto/repo.git
Enter the cloned repo directory.
$ cd repo.git
Push the cloned repository to Github with --mirror parameter
$ git push --mirror https://github.com/fabianocouto/repo.git
Remove the temporary local repository.
$ cd ..
$ rm -rf REPO.git