setup http/https git server on nginx via git-http-backend
Precondition sudo apt-get install nginx fcgiwrap git apache2-utils Set up https server First, please setup your https server by your self. You can refer to my guide git-http-backend git-http-backend is a Server side implementation of Git over HTTP. /usr/lib/git-core/git-http-backend Set Up Password Authentication file for your git server We can get a password with MD5-based password algorithm, Apache variant via openssl passwd command. You can add a username to the file using this command. We are using sammy as our username, but you can use whatever name you'd like: sudo sh -c "echo -n 'sammy:' >> .gitpasswd" Next, add an encrypted password entry for the username by typing: sudo sh -c "openssl passwd -apr1 >> .gitpasswd" You can repeat this process for additional usernames. You can see how the usernames and encrypted passwords are stored within the file by typing: cat .gitpasswd Output sammy:$apr1$wI1/T0nB$jEKuTJHkTOOWk...