prettyqert.blogg.se

Simple git server
Simple git server













  1. SIMPLE GIT SERVER HOW TO
  2. SIMPLE GIT SERVER FULL
  3. SIMPLE GIT SERVER SOFTWARE

I personally use Syncthing, which runs 24/7 on a media server in my living room – and then syncs to all my other devices whenever they’re connected to a network. We have many ways to sync directories in 2020: whether you use a hosted service like Google Drive or use a self-hosted solution like ownCloud. (Don’t worry: I do not ever sync working directories. It is just another directory I intend to sync using some Dropbox-like file syncing software. There is nothing special about this directory. The first problem that needs solving: where should the remote live? I have chosen to use a simple synced directory. I don’t need issue trackers, wikis, continuous integration, or a way to manage patches coming from multiple contributors.įor these use cases, I have set up a tiny git remote that only I can access. Sometimes, though, all I need is a simple git remote to sync a simple project.

SIMPLE GIT SERVER SOFTWARE

If you’re a software developer, you’ve probably used GitHub, Bitbucket, and GitLab at some point – and you’re maybe familiar with Gitea, Gogs, or SourceHut.Īll of this software is great, and each git forge has valuable features that save users time and effort when working on projects. There are plenty of full-featured git forges out there. No need to maintain a gitlab instance if your needs are simple.Self-hosting a tiny git remote March 22, 2020

simple git server simple git server

You can create guest accounts that will only be able to see specific repositories, and they won't even know the other ones are here. Our users can now see, read and sometimes write into the repositories of our git server. # the end, to get the repo name as it is specified in gitolite conf

SIMPLE GIT SERVER FULL

# gitweb passes us the full repo path we need to strip the beginning and Use the gitolite command to find the values of the GL_ variables:Ĭonfigure gitweb in /usr/local/etc/nf: The Gitolite/GitWeb interaction is irrelevant to the webserver. # cp -r /usr/local/share/examples/git/gitweb /usr/local/ Make sure git is compiled with option GITWEB.Ĭopy the gitweb files where nginx will look for them: Let's try to clone a repository we're not allowed to see:įatal: remote error: FATAL: R any erika jean DENIED by fallthru # cd # vim # git add # git commit -m "Pushed from HTTP" Remote: Total 3 (delta 0), reused 0 (delta 0) Let's clone a repository, add a commit and push it: Here we call gitolite-shell instead of git-http-backend directly to have gitolite check the users' permissions. Otherwise, SCRIPT_FILENAME will be set incorrectly and the shell will 403. # This include must be AFTER the above declaration. Use openssl passwd -apr1 to generate passwords.Īuth_basic_user_file /usr/local/etc/nginx/git_users.htpasswd įastcgi_param PATH_INFO $fastcgi_path_info įastcgi_param SCRIPT_FILENAME /usr/local/libexec/gitolite/gitolite-shell įastcgi_param QUERY_STRING $query_string įastcgi_param GIT_PROJECT_ROOT /home/gitolite/repositories įastcgi_param GIT_HTTP_BACKEND /usr/local/libexec/git-core/git-http-backend įastcgi_param GITOLITE_HTTP_HOME /home/gitolite Jean:$apr1$fkADkYbl$Doen7IMxNwmD/r6X1LdM.1Įrika:$apr1$fOOlnSig$4PONnRHK3PMu8j1Hn圎Cc0 # make -C /usr/ports/# cat /usr/local/etc/nginx/git_users.htpasswd

SIMPLE GIT SERVER HOW TO

I assume you already know how to install and do the basic configuration of nginx. Please make sure you have the correct access rights Try to clone repository erika_only with user jean:įATAL: R any erika_only jean DENIED by fallthruįatal: Could not read from remote repository. # git commit -m "Add users Jean and Erika."Ĭreate new repositories by setting their ACLs in the config file:

simple git server

# git clone two new keys (and thus users) and add them to the repository: Notice that the admin user can login using SSH, and that it will only execute gitolite's shell:Ĭommand="/usr/local/libexec/gitolite/gitolite-shell admin",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa = all you need to do on the server. % /usr/local/bin/gitolite setup -pk admin.pub Login as the UNIX user and initialize the system: That username will be considered the admin user.Ĭreate a UNIX user that will own the files: # make -C /usr/ports/devel/gitolite/ install cleanĬopy your public key on the server, naming it. It handles SSH connections and have the ACL functionality we're after.įirst, here's a good read about how gitolite works:

  • Have ACLs to allow repositories to only be visible and/or accessible by some specific users.
  • Allow people to clone/pull/push using both SSH and HTTP.
  • Let's create a simple git server on FreeBSD.















    Simple git server