From 6b752d3456e801a80f39226b0c386a66426e1fd4 Mon Sep 17 00:00:00 2001 From: VG Date: Thu, 24 Nov 2016 17:05:46 +0100 Subject: add mit license --- license.txt | 21 ++++++++++++++++ readme.rst | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ readme.txt | 57 ------------------------------------------- 3 files changed, 101 insertions(+), 57 deletions(-) create mode 100644 license.txt create mode 100644 readme.rst delete mode 100644 readme.txt diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..648eeb8 --- /dev/null +++ b/license.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright © 2016 vg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/readme.rst b/readme.rst new file mode 100644 index 0000000..f0dd8b5 --- /dev/null +++ b/readme.rst @@ -0,0 +1,80 @@ +Description +=========== + +This repository is a quick setup to allow readonly and readwrite access for +git-only through ssh. It is simple but should be secure. You can review the +script for security as it is really short. + + +sudo adduser --home /home/git --no-create-home --shell /bin/sh --gecos 'git version control' --disabled-password git +sudo mkdir /home/git +sudo chown git:git /home/git +sudo chmod 2770 /home/git +sudo cp path/gitcmd /home/git/ +sudo gpasswd -a calendros git + +in /etc/ssh/sshd_config: + +Match User git + X11Forwarding no + AllowTcpForwarding no + AllowAgentForwarding no + PermitTunnel no + GatewayPorts no + PermitTTY no + Banner "Only git access allowed" + AuthorizedKeysFile /etc/ssh/git_keys + +in /etc/ssh/git_keys + +# usage: restrict,command="./gitcmd username" key +# then create a ~git/username.listro for authorized repositories + +username.listro with username replaced with the username given at the gitcmd +argument at the front of the ssh key contains a list of repositories +directory for read-only access. username.listrw contains a list of read-write +access. + +git directories are created with git init --bare + +Example of directory structure: + +in /home/git: + +$ tree --dirsfirst -L 2 +. +├── +│   ├── branches +│   ├── hooks +│   ├── info +│   ├── objects +│   ├── refs +│   ├── HEAD +│   ├── config +│   └── description +├── .listrw +├── .listro +├── create-repo +└── gitcmd + +6 directories, 8 files + +License +======= + +Unless specified otherwise, this project is licensed under the terms of the +MIT license. You should have received a copy of the MIT License along with +this program. If not, see . + +SPDX-License-Identifier: MIT + +Copyright © 2016 vg + +Contact +======= + +developer + vg + +mail + vg@devys.org diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 27039f5..0000000 --- a/readme.txt +++ /dev/null @@ -1,57 +0,0 @@ -This repository is a quick setup to allow readonly and readwrite access for -git-only through ssh. It is simple but should be secure. You can review the -script for security as it is really short. - - -sudo adduser --home /home/git --no-create-home --shell /bin/sh --gecos 'git version control' --disabled-password git -sudo mkdir /home/git -sudo chown git:git /home/git -sudo chmod 2770 /home/git -sudo cp path/gitcmd /home/git/ -sudo gpasswd -a calendros git - -in /etc/ssh/sshd_config: - -Match User git - X11Forwarding no - AllowTcpForwarding no - AllowAgentForwarding no - PermitTunnel no - GatewayPorts no - PermitTTY no - Banner "Only git access allowed" - AuthorizedKeysFile /etc/ssh/git_keys - -in /etc/ssh/git_keys - -# usage: restrict,command="./gitcmd username" key -# then create a ~git/username.listro for authorized repositories - -username.listro with username replaced with the username given at the gitcmd -argument at the front of the ssh key contains a list of repositories -directory for read-only access. username.listrw contains a list of read-write -access. - -git directories are created with git init --bare - -Example of directory structure: - -in /home/git: - -$ tree --dirsfirst -L 2 -. -├── -│   ├── branches -│   ├── hooks -│   ├── info -│   ├── objects -│   ├── refs -│   ├── HEAD -│   ├── config -│   └── description -├── .listrw -├── .listro -├── create-repo -└── gitcmd - -6 directories, 8 files -- cgit v1.2.3