I followed this tutorial to set up a git repository on an EC2 instance. http://git-scm.com/book/ch4-4.html. Basically, I add a new git user and include my public key in authorized_keys. After setting up the git user, I just initialize a new repo by git init --bare.
However, I've noticed that I can clone it easily without needing my private key. Is there a way to force it to only be available via SSH so authorized_keys is followed? I'm guessing it's using the default of git which is port 9418 which doesn't seem to support authentication.
git clone [email protected]I am not sure if it is called git protocol, but I was talking about this: kernel.org/pub/software/scm/git/docs/git-daemon.html which is a daemon running on TCP 9418gitprotocol. To stop it, you need to stop runninggit-daemon. The confusion from @Henrik and others may be due to majorgitproviders only exposinghttpsandsshdue to security.