From 6aa746023ce594f18c493eec5898a1d964b723dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Sun, 5 Sep 2021 18:00:38 +0200 Subject: [PATCH] Add readme --- README.md | 10 ++++++++++ gitea-ssh | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 README.md create mode 100755 gitea-ssh diff --git a/README.md b/README.md new file mode 100644 index 0000000..0f902f5 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Git repository + +You're looking at it. + +This has been setup to allow SSH passthrough as described [here](https://docs.gitea.io/en-us/install-with-docker/). + +The file `gitea-ssh` is the one used in `/app/gitea/gitea`. That finds the IP of the container automatically. + + +# [The rest of my docker-compose setup](/thomas/docker-server/) \ No newline at end of file diff --git a/gitea-ssh b/gitea-ssh new file mode 100755 index 0000000..2f2e578 --- /dev/null +++ b/gitea-ssh @@ -0,0 +1,3 @@ +#!/bin/sh +IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' gitea) +ssh -o StrictHostKeyChecking=no git@$IP "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"