How to install git HTTP protocol capture to automate development on a remote server

I use git for version control, and I want to automate git to pull everything out so that one of the collaborators automatically clicks on the release branch to the remote server, and if I want to do this via ssh, I have to add all the co-authors ssh keys to my server, but I don’t want to give them access to the server, so I want to set this git to HTTP interception so that everyone can click on the remote server via HTTP

What I have done so far is to install git hook, and I use Nginx as a web service, and I put the bare git repository in

/var/www/html/test_repo

and I installed my git remote on the local machine as follows:

git remote add test http://ServerIp/test_repo

but he gives me this error:

fatal: repository 'http://ServerIp/test_repo/' not found
+4
1

, NGiNX /usr/lib/git-core/git-http-backend, git clone/pull.

. : URL- git.

    listen 80;
    server_name myhostname;
    access_log /var/log/nginx/git.access.log;
    error_log /var/log/nginx/git.error.log;
    gzip off;

    location ~ /git(/.*) {
      ...
    }

, URL- git http://ServerIp/git/test_repo, fastcgi_param GIT_PROJECT_ROOT /var/www/html

+2

Source: https://habr.com/ru/post/1682599/


All Articles