GitLab for storing the test automation code within the firewall
GitLab is an open source clone of the popular GitHub service. The best possible thing is to have your own private GitLab installation running locally on your server or network, or even on your local machine in a VM.
Unlike GitHub or BitBucket, you host the GitLab installation yourself on servers you control.
Unlike GitHub, or even a version of GitLab hosted on a normal server, your local GitLab installation will only be accessible to you and this defeats the point of having a version control system with powerful collaboration features like merge requests, but for individuals who just want project and source code management, this will be a powerful solution.
How to Install?
The omnibus package - https://about.gitlab.com/installation/
Reason - Omnibus GitLab takes just 2 minutes to install and is packaged in the popular deb and rpm formats.