You already have a Git server
maurycyz.com
You already have a Git server
1–10 of 454 posts
Re: You already have a Git server
#2Re: You already have a Git server
#3Re: You already have a Git server
#4Interesting. I am just trying to decide between self-hosting Forgejo and other options for hosting Git in own private network.
Re: You already have a Git server
#5Maybe I'm too old, but are there people that really didn't know that any ssh access is sufficient for using git?
Re: You already have a Git server
#6Re: You already have a Git server
#7Maybe I'm too old, but are there people that really didn't know that any ssh access is sufficient for using git?
Re: You already have a Git server
#8TIL about the update options for checked out branch. In practise though usually you want just the .git "bare" folder on server
Re: You already have a Git server
#9Tip: create a `git` user on the server and set its shell to `git-shell`. E.g.:
sudo useradd -m -g git -d /home/git -s /usr/bin/git-shell git
You might also want to restrict its directory and command access in the sshd config for extra security.Then, when you need to create a new repository you run:
sudo -u git git init --bare --initial-branch=main /home/git/myrepo.git
And use it like so: git clone git@myserver:myrepo.git
Or: git remote add myserver git@myserver:myrepo.git
git push -u myserver main
This has the exact same UX as any code forge.I think that initializing a bare repository avoids the workarounds for pushing to a currently checked out branch.
Re: You already have a Git server
#10Maybe I'm too old, but are there people that really didn't know that any ssh access is sufficient for using git?
most people think git = github