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:
- How to setup own GIT Server? Whats bare/non-bare repos?
- Setting up a private GIT Repo
- bitbucket on my own server
Others:
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 gitetc.) to store the projects under. – slhck – 2015-05-22T18:15:02.453The tutorial clearly shows how to do
useradd git, but beyond that, e.g., how to use the form ofgit@git.myown.com:my-project.gitto access git is still missing. I meant, no ssh access to thatgituser setup is mentioned, which is the most important step. – xpt – 2015-05-22T18:19:34.013Do you have an SSH server installed and running? Can other users log in? Then a
gituser should also be able to log in. – slhck – 2015-05-22T18:25:58.593You mean to upload my id_rsa.pub file to that
gituser's home directory, so that I can ssh in asgit@gitserver. hmm... OK. I'll try. Anything else? – xpt – 2015-05-22T18:34:03.457That 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
gituser, the rest should be easy. – slhck – 2015-05-22T18:38:39.713