File: git-http-backend

package info (click to toggle)
fcgiwrap 1.1.0-16
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: ansic: 703; sh: 199; makefile: 35
file content (37 lines) | stat: -rwxr-xr-x 967 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
set -eux

cd "$AUTOPKGTEST_TMP"

export GIT_AUTHOR_NAME=root
export GIT_AUTHOR_EMAIL=root@localhost
export GIT_AUTHOR_DATE="@1234567890 +0000"
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"

git init test1
git -C test1 commit --allow-empty -m test
chown -R www-data:www-data "$AUTOPKGTEST_TMP"/test1/.git

tee /etc/nginx/sites-available/default <<EOF
server {
	listen 80;

	location / {
		fastcgi_pass unix:/run/fcgiwrap.socket;
		include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
		fastcgi_param GIT_PROJECT_ROOT "$AUTOPKGTEST_TMP";
		fastcgi_param GIT_HTTP_EXPORT_ALL "";
		fastcgi_param PATH_INFO \$uri;
		fastcgi_param NO_BUFFERING "";
		fastcgi_buffering off;
		gzip off;
	}
}
EOF
systemctl restart nginx

git clone http://localhost/test1 test2
git -C test2 show --pretty=fuller 0f8c7c069313fcd3ef17b35305386916e4ffa9cd