Simplest way to setup my own remote private git server

4

First of all, I've read all the git-server-setup documents on the internet, but still, there is one thing missing -- I want to setup a simple GIT server in (Ubuntu) Virtual Machine for myself, not for a team. I.e.,

I'm trying to find the simplest way to setup my own private git server that don't need to depend on gitolite, gitweb, etc, etc. Just the plain simplest one.

This article, https://askubuntu.com/questions/12647/setting-up-a-git-server, shows how to setup server-less git repository, but have to access it from remote via SSH:

git push ssh://<username>@<remote-git-hostname>/path/to/project.git master

That's very weird, not the common way,

git remote add origin git@git.droplet.com:my-project.git

The article I listed below, How To Set Up a Private Git Server on a VPS is very close to what I need, but miss the very important point. It shows how to setup ssh user@123.45.56.78 but miss the important step for that user to use the form of git@git.myown.com:my-project.git to access git. E.g.,

git remote add origin git@git.droplet.com:my-project.git

So, again, What's the simpliest way to setup a remote git server?

Ref:

Articles read from this site:

Others:

xpt

Posted 2015-05-22T16:28:08.443

Reputation: 5 548

You've missed the point entirely. difference between using an ip address or a domain has never been my concern. – xpt – 2015-05-22T16:58:48.010

The tutorial clearly shows how to set up the Git user (useradd git etc.) to store the projects under. – slhck – 2015-05-22T18:15:02.453

The tutorial clearly shows how to do useradd git, but beyond that, e.g., how to use the form of git@git.myown.com:my-project.git to access git is still missing. I meant, no ssh access to that git user setup is mentioned, which is the most important step. – xpt – 2015-05-22T18:19:34.013

Do you have an SSH server installed and running? Can other users log in? Then a git user should also be able to log in. – slhck – 2015-05-22T18:25:58.593

You mean to upload my id_rsa.pub file to that git user's home directory, so that I can ssh in as git@gitserver. hmm... OK. I'll try. Anything else? – xpt – 2015-05-22T18:34:03.457

That should be enough to give you access. Not sure if there's anything to consider after that, but as long as you can log in with the git user, the rest should be easy. – slhck – 2015-05-22T18:38:39.713

No answers